Re: 3 number and dot..
- From: Abandoned <besturk@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 14:03:59 -0700
On Oct 31, 10:38 pm, Paul McGuire <pt...@xxxxxxxxxxxxx> wrote:
On Oct 31, 2:58 pm, Abandoned <best...@xxxxxxxxx> wrote:
Hi..
I want to do this:
for examle:
12332321 ==> 12.332.321
How can i do?...
x = (12332321,)
while (x[0]>0): x=divmod(x[0],1000)+x[1:]
(0, 12, 332, 321)x
".".join(map(str,x[1:]))
'12.332.321'
-- Paul
Hmm.
When the number as 1023 the result is 1.23 :(
How can i fix it ?
.
- References:
- 3 number and dot..
- From: Abandoned
- Re: 3 number and dot..
- From: Paul McGuire
- 3 number and dot..
- Prev by Date: Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- 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):