Leading zeroes problem

Chris Liechti cliechti at gmx.net
Thu May 16 17:15:21 EDT 2002


jb <jblazi at hotmail.com> wrote in
news:3ce41ce2_1 at goliath2.newsgroups.com: 
> How do I get '00.0' from 0.0. I can say '%03d' % 0 but with floating
> point numbers this does not work.

(python 2.2, win32)

>>> "%04.1f" % 0
'00.0'

chris 



-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list