Source Code:
(back to article)
decimal_num = 3.14159265 rounded_num = "{:.2f}".format(decimal_num) print(rounded_num) # 3.14
Result:
Report an issue