I want a to be rounded to 13.95.
a
>>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999
The ro
We multiple options to do that : Option 1:
x = 1.090675765757 g = float("{:.2f}".format(x)) print(g)
Option 2: The built-in round() supports Python 2.7 or later.
x = 1.090675765757 g = round(x, 2) print(g)