Jun-19-2017, 07:19 AM
in any case you would like to use string formatting when print float numbers.
>>> x = 0.72*5 >>> x 3.5999999999999996 >>> '{:0.2f}'.format(x) '3.60' >>> 'the result of calculations is {:0.2f}'.format(x) 'the result of calculations is 3.60' >>>