xxxxxxxxxx
>>> x = 13.949999999999999999
>>> x
13.95
>>> g = float("{:.2f}".format(x))
>>> g
13.95
>>> x == g
True
>>> h = round(x, 2)
>>> h
13.95
>>> x == h
True
xxxxxxxxxx
>>> #This example illustrates the use of [precision] option
>>> format(16.777, '.1f')
'16.8'
>>> format(16.777, '.2f')
'16.78'
>>> format(16.777, '.3f')
'16.777'
>>> format(16.777, '.7f')
'16.7770000'