problems using % in strings with %(var)s replacements

k kevin04107 at hotmail.com
Thu May 24 11:23:25 EDT 2001


Here is a different way. Try passing the %-sign as a string.

str = "%d%s" % ( 42, '%' )

the result: str = '42%'


> I see the % in 50% is the problem but how can I use the %-char in strings
> and still use %(...)s replacements??
>
> Thomas
>
>
>





More information about the Python-list mailing list