simple question

Wouter van Ooijen www.voti.nl wouter at voti.nl
Tue Feb 18 01:38:14 CET 2003


>>>>> print "%-3d" % 10
>> 10
>> 
>> how do I get python to print "010" instead?
>
>>>> print "%03d" % 10

or print "0%3d" % 10, or even print "010" ;)




Wouter van Ooijen

-- ------------------------------------
http://www.voti.nl
PICmicro chips, programmers, consulting




More information about the Python-list mailing list