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
Post a Comment