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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -