pyformat.info icon indicating copy to clipboard operation
pyformat.info copied to clipboard

numbers: thousands separator

Open hottwaj opened this issue 5 years ago • 1 comments

Hey thanks for the nice cheat sheet!

You're missing the optional thousands separator for numbers

'{:,}'.format(1000000)
Output: 1,000,000

hottwaj avatar Feb 28 '19 15:02 hottwaj

That was an intentional omission since that is unfortunately not locale aware. However mentioning it with a disclaimer of that fact could be useful.

ulope avatar Sep 17 '19 10:09 ulope