Printing "%"
Kalle Svensson
kalle at gnupung.net
Thu Mar 29 11:24:18 EST 2001
Sez Mix:
> How do you print a percenrage (%)sign in Python?
> I tried :
> return "select * from fax where id LIKE '%s\%'" %ident
Use double %-sign:
return "select * from fax where id LIKE '%s%%'" % ident
Peace,
Kalle
--
Email: kalle at gnupung.net | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
[ Not signed due to lossage. Blame Microsoft Outlook Express. ]
More information about the Python-list
mailing list