Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3883 Vistas

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
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
5428
2
dic 22
6758
3
mar 15
5761
2
mar 22
20921
1
ene 24
4699