python float to string 2 digits code example
Example 1: force two decimal places python
print ("{0:.2f}".format(a))
Example 2: python 2 decimal places format
"{:.2f}".format(5)
print ("{0:.2f}".format(a))
"{:.2f}".format(5)