Printing "%"

Bob Kline bkline at rksystems.com
Thu Mar 29 11:27:16 EST 2001


On Thu, 29 Mar 2001, Mix wrote:

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

As the manual says, it works just like the C printf conversion does.
Try:
    return "select * from fax where id LIKE '%s%%'" % ident

-- 
Bob Kline
mailto:bkline at rksystems.com
http://www.rksystems.com





More information about the Python-list mailing list