Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4136 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mrt. 15
6104
2
dec. 22
7403
3
mrt. 15
6376
2
mrt. 22
21714
1
jan. 24
5264