+ 1
How can we print a specific number of digits after decimal point in python ?
2 Answers
+ 1
a=1.47488592
print("%.2f" %a)
(for 2 decimal points)
0
thnx :) .
what if we have two numbers say a and b . can we do it like this ?
print("{%.2f}{%.2f}".format(a,b))