Well, look at this
https://docs.python.org/3.5/library/locale.html
>>> num = '1234567890' >>> "{0:,d}".format(int(num)) '1,234,567,890' >>>Also, you might be interested from locale module. It can handle currency formatting.
https://docs.python.org/3.5/library/locale.html