[BangPypers] HELP ON FORMATING OUTPUT
Siddharta
siddharta.lists at gmail.com
Wed Mar 19 18:07:13 CET 2008
Try the locale module - http://docs.python.org/tut/node13.html
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'English_United States.1252')
'English_United States.1252'
>>> x = 1234567.8
>>> locale.format("%d", x, grouping=True)
'1,234,567'
--
Siddharta Govindaraj
Jiten Shah wrote:
> Dear Friends,
>
> I am new for python and new for this mailing list also
>
> My problem is i want to print
> 1156179 to -> 1,156,179.00
>
> Can somebody help me.
>
> Jiten
>
>
>
More information about the BangPypers
mailing list