Re: 3 number and dot..
- From: Abandoned <besturk@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 21:39:05 -0000
On Oct 31, 10:50 pm, Roberto Bonvallet <rbonv...@xxxxxxxxx> wrote:
On 31 oct, 16:58, Abandoned <best...@xxxxxxxxx> wrote:
Hi..
I want to do this:
for examle:
12332321 ==> 12.332.321
How can i do?'12.332.321'
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]
--
Roberto Bonvallet
I'm sorry but it give me error "no module named groupby"
My python version is 2.51
.
- Follow-Ups:
- Re: 3 number and dot..
- From: Steven D'Aprano
- Re: 3 number and dot..
- References:
- 3 number and dot..
- From: Abandoned
- Re: 3 number and dot..
- From: Roberto Bonvallet
- 3 number and dot..
- Prev by Date: Re: XML DOM, but in chunks
- Next by Date: Re: 3 number and dot..
- Previous by thread: Re: 3 number and dot..
- Next by thread: Re: 3 number and dot..
- Index(es):
Relevant Pages
|