python format string thousand separator with spaces -


for printing number thousand separator, 1 can use python format string :

'{:,}'.format(1234567890) 

but how can specify want space thousands separator?

here bad simple solution if don't want mess locale:

'{:,}'.format(1234567890.001).replace(',', ' ') 

Comments

Popular posts from this blog

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -