Mulig SPAM: float print formatting

Grant Edwards grante at visi.com
Tue Feb 13 10:42:34 EST 2007


On 2007-02-13, hg <hg at nospam.org> wrote:
> NOSPAM plz wrote:

>>> Considering the float 0.0, I would like to print 00.00.
>>>
>>> I tried '%02.02f' % 0.0 ... but I get 0.00

>> Try this:
>> 
>> a = 45.45 # the floating number
>> 
>> print "some text",
>> print a,
>> print "some text again"

> Sorry,
>
> must be very slow or not enough coffee yet...

Don't worry.  I do know what you did wrong and how to fix it,
and I have absolutely no idea what "NOSPAM plz" is trying to
say  either.

-- 
Grant Edwards                   grante             Yow!  I'm in a twist
                                  at               contest!! I'm in a
                               visi.com            bathtub! It's on Mars!! I'm
                                                   in tip-top condition!



More information about the Python-list mailing list