S
SimonPalmer
anyone recommend a way of formatting floats with comma separators?
e.g. 500000.00 -> 500,000.00
e.g. 500000.00 -> 500,000.00
anyone recommend a way of formatting floats with comma separators?
James said:There is a much easier more consistent way:
'en_AU.UTF-8'
'5000000,00'>>> import os
>>> locale.setlocale(locale.LC_ALL, os.environ["LANG"]) 'sv_SE.UTF-8'
>>> locale.format("%0.2f", 5000000, True)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.