Can Python format long integer 123456789 to 12,3456,789 ?

Ben Cartwright bencvt at gmail.com
Thu Jun 1 20:15:59 EDT 2006


John Machin wrote:
> A.M wrote:
> > Hi,
> >
> > Is there any built in feature in Python that can format long integer
> > 123456789 to 12,3456,789 ?
> >
>
> Sorry about my previous post. It would produce 123,456,789.
> "12,3456,789" is weird -- whose idea PHB or yours??

If it's not a typo, it's probably a regional thing.  See, e.g.,
http://en.wikipedia.org/wiki/Indian_numbering_system

--Ben




More information about the Python-list mailing list