formatted_float = "{:.2f}".format(a_float)
float = 45,0748
newFloat = round(float, 2)
# Python v2.7-
"%.15g" % f
# Python v3.0
format(f, ".15g")
# Python 2.7+, 3.2+
# Pass float to Decimal constructor
from decimal import Decimal
Decimal(f)
import math
radius = 5
area = math.pi * radius * radius
print("Area = %.2f" % area)