Python: Thousands Separator in Formatted Strings
It’s very easy to add thousands separators to numbers:
>>> big_num = 1234567890.123
>>> print(f'{big_num:,}')
1,234,567,890.123
It’s very easy to add thousands separators to numbers:
>>> big_num = 1234567890.123
>>> print(f'{big_num:,}')
1,234,567,890.123
Leave a comment