Percent sign in format string?

John Hunter jdhunter at nitace.bsd.uchicago.edu
Thu Jul 18 20:48:03 EDT 2002


>>>>> "Ron" == Ron Levine <ron at dorianresearch.com> writes:

    Ron> How can I put a "%" sign in a format string?

% quotes itself:

>>> print '%d%%' % 5
5%






More information about the Python-list mailing list