For printing number with thousand separator, one can use the python format string :
'{:,}'.format(1234567890)
But how can I specify that I want a space for thousands separator?
Here is bad but simple solution if you don't want to mess with locale
:
'{:,}'.format(1234567890.001).replace(',', ' ')