How do I put % in a format sting?

Gregory Piñero gregpinero at gmail.com
Thu Oct 5 22:06:42 CEST 2006


How do I put % in a format sting?

For example I want this to work:

>>> sql_template="""SELECT ENTRY FROM LOOKUP WHERE FIELDNAME LIKE '%s%V'"""
>>> sql_template % 'userdef103'
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: not enough arguments for format string



-- 
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)



More information about the Python-list mailing list