Skip to Content
मेन्यू
This question has been flagged
1 Reply
4137 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
मार्च 15
6105
2
दिस॰ 22
7404
3
मार्च 15
6376
2
मार्च 22
21716
1
जन॰ 24
5267