What’s the easiest way to add commas to an integer? [duplicate]
No one so far has mentioned the new ‘,’ option which was added in version 2.7 to the Format Specification Mini-Language — see PEP 378: Format Specifier for Thousands Separator in the What’s New in Python 2.7 document. It’s easy to use because you don’t have to mess around with locale (but is limited for … Read more