Re: Decimal formatting

2007-09-13 Thread Aahz
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > a >12.3 print '%0.2f' % a >12.33 a = 1 print '%0.2f' % a >1.00 >>> '%.2f' % 1 '1.00' -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "Many customs in this life per

Re: Decimal formatting

2007-09-13 Thread Zentrader
The documentation is here http://docs.python.org/lib/typesseq-strings.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimal formatting

2007-09-13 Thread [EMAIL PROTECTED]
On Sep 13, 3:50 pm, Harlin Seritt <[EMAIL PROTECTED]> wrote: > Cant believe I have to post this and get help... and can't believe I > couldnt Google it reasonably well enough... I need to take a float > variable and have it display as a string to always have two decimal > places: > > 12. -> 12.

Re: Decimal formatting

2007-09-13 Thread J. Clifford Dyer
On Thu, Sep 13, 2007 at 01:50:51PM -0700, Harlin Seritt wrote regarding Decimal formatting: > > Cant believe I have to post this and get help... and can't believe I > couldnt Google it reasonably well enough... I need to take a float > variable and have it display as a string to always have two d