Re: 3 number and dot..
- From: Hrvoje Niksic <hniksic@xxxxxxxxxx>
- Date: Wed, 31 Oct 2007 22:48:21 +0100
Abandoned <besturk@xxxxxxxxx> writes:
Hi..
I want to do this:
for examle:
12332321 ==> 12.332.321
How can i do?
I'm surprised that no one has proposed a regex solution, such as:
'1.234.567'import re
re.sub(r'\d{1,3}(?=(?:\d{3})+$)', r'\g<0>.', str(1234567))
.
- References:
- 3 number and dot..
- From: Abandoned
- 3 number and dot..
- Prev by Date: Re: 3 number and dot..
- Next by Date: Re: 3 number and dot..
- Previous by thread: Re: 3 number and dot..
- Next by thread: XML DOM, but in chunks
- Index(es):