float in python print code example
Example 1: float print format python
print("x = {:.2f}".format(x))
Example 2: printing float number python
x = 1.1234567898
print("%.10f" % x)
print("x = {:.2f}".format(x))
x = 1.1234567898
print("%.10f" % x)