I want a to be rounded to 13.95.
a
>>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999
The ro
Use
print"{:.2f}".format(a)
instead of
print"{0:.2f}".format(a)
Because the latter may lead to output errors when trying to output multiple variables (see comments).