Skip to Content
Menú
This question has been flagged
1 Respondre
4132 Vistes

Hi, when i have a big number(eg : 458922211,99 ), i want to display the spaces between the number (458 922 211,99). How to do that ? thanks

Avatar
Descartar
Best Answer

Hi nailyk, In your report.py, do as per following changes,

for example,

import re
a = 458922211
b = str(a)
c = re.findall('.{%s}'%3,b)  
print "list:::",c  
d = ' '.join(c)   
print "Final Output:::",d

Output,

 list::: ['458', '922', '211']
 Final Output::: 458 922 211
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 15
6096
2
de des. 22
7395
3
de març 15
6369
2
de març 22
21704
1
de gen. 24
5257