跳至内容
菜单
此问题已终结
1 回复
4134 查看

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

形象
丢弃
最佳答案

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
形象
丢弃
相关帖文 回复 查看 活动
1
3月 15
6097
2
12月 22
7395
3
3月 15
6371
2
3月 22
21705
1
1月 24
5257