Printing "%"

Mix mix77 at usa.net
Thu Mar 29 10:58:46 EST 2001


How do you print a percenrage (%)sign in Python?
I tried :
  return "select * from fax where id LIKE '%s\%'" %ident

I get the following error
 File "/home/mixo/faxserv/cgi-bin/OutputStr.py", line 136, in GetFaxPages
    return "select * from fax where id LIKE '%s\%'" %ident
TypeError: not enough arguments for format string

Please help!





More information about the Python-list mailing list