Format Python Decimal
This shows you how to take a Python Deciaml type number and format it so that it shows up with two places after the decimal place (like dollar values).
>>> num = Decimal("5")
>>> num.quantize(decimal.Decimal('.01'))
Categories: Python