3 number and dot..
Abandoned
besturk at gmail.com
Wed Oct 31 17:09:10 EDT 2007
More information about the Python-list mailing list
Wed Oct 31 17:09:10 EDT 2007
- Previous message (by thread): 3 number and dot..
- Next message (by thread): 3 number and dot..
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Oct 31, 10:50 pm, Roberto Bonvallet <rbonv... at gmail.com> wrote: > On 31 oct, 16:58, Abandoned <best... at gmail.com> wrote: > > > > > Hi.. > > I want to do this: > > for examle: > > 12332321 ==> 12.332.321 > > > How can i do? > >>> x = 12332321 > >>> '.'.join(''.join(i for n, i in g) for k, g in groupby(enumerate(reversed(str(x))), lambda (n, i): n//3))[::-1] > '12.332.321' > > -- > Roberto Bonvallet Thank you but it give me this error: NameError: name 'groupby' is not defined
- Previous message (by thread): 3 number and dot..
- Next message (by thread): 3 number and dot..
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list