I want a to be rounded to 13.95.
a
>>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999
The ro
I feel that the simplest approach is to use the format() function.
format()
For example:
a = 13.949999999999999 format(a, '.2f') 13.95
This produces a float number as a string rounded to two decimal points.