quoting %

Matthias Teege matthias-dated at mteege.de
Wed Oct 13 07:32:38 EDT 2004


I need a string like this "foo '%value%'" for a database query but
print "'%%s%'"%value gives me TypeError: not all arguments converted
during string formatting. How does I quote the "%" sign in this case?

Matthias Teege -- http://www.mteege.de
make world not war

More information about the Python-list mailing list