Using Python v2, I have a value running through my program that puts out a number rounded to 2 decimal places at the end:
like this:
print (\"Total
You could use locale.currency if TotalAmount represents money. It works on Python <2.7 too:
>>> locale.setlocale(locale.LC_ALL, '')
'en_US.utf8'
>>> locale.currency(123456.789, symbol=False, grouping=True)
'123,456.79'
Note: it doesn't work with the C locale so you should set some other locale before calling it.