print a %

itsy bitsy meowbot 53ab2750 at meowing.net
Sat Sep 28 06:24:29 EDT 2002


Claude wrote:
> When I do 
> print "image size=%d%" %(50)
> I've got an error
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ValueError: incomplete format
> 
> I do not know how to escape the second %

print "image size=%d%%" %(50)

<http://www.python.org/doc/current/lib/typesseq-strings.html>



More information about the Python-list mailing list