Hello,

>>> import locale
>>> locale.setlocale(locale.LC_ALL, "pl_PL")
'pl_PL'
>>> i=0.20
>>> j=0.25
>>> locale.format('%f', i)
'0,200000'
>>> locale.format('%f', j)
'0,250000'

I need to print the numbers in the following format:
'0,2'   (i)
'0,25'  (j)
So the last trailing zeros are not printed.

Regards
Przemyslaw Bak (przemol)



















































----------------------------------------------------------------
Najwieksza baza najtanszych ofert mieszkaniowych
http://linkint.pl/f2a0e
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to