Decimal formatting

Harlin Seritt harlinseritt at yahoo.com
Thu Sep 13 16:50:51 EDT 2007


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.3333 -> 12.33
1.0 -> 1.00
etc...

Anyone willing to help with this one?

thanks,

Harlin




More information about the Python-list mailing list