String formatting characters - looking for details
fredrik at pythonware.com
Thu Feb 8 07:40:21 CET 2001
Martin Bless wrote:
> (1) Where can I find some more details about the string formatting
your nearest C/Unix manual. or the Python 2.1 docs:
> (2) How I print hex values with zeros padded left, like 0F or 0A?
> print '%X' % 15 # two digits, wanted
print "%02X" % 15
> (3) This is from the Python docs - I'm looking for more information on
> how to use the formatting characters.
searching the net for "sprintf" brings up an infinite number
of manual pages. (fwiw, the perl manual page says these
formatting codes are "universally known"...)
More information about the Python-list