Source Code:
(back to article)
from decimal import Decimal decimal_num = Decimal('3.14159265') rounded_num = decimal_num.quantize(Decimal('0.00')) print(rounded_num) # 3.14
Result:
Report an issue