(This post was originally published in @pythonetc telegram channel) The round function rounds a number to a given precision in decimal digits. >>> round(1.2) 1 >>> round(1.8) 2 >>> round(1.228, 1) 1.2 Also you can set up negative precision: >>> round(413.77, -1) 410.0 >>> round(413.77, -2) 400.0 round returns value of input number’s type: >>> type(round(2, 1)) >>> type(round(2.0, 1)) >>> type(round(Decimal(2), 1)) >>> type(round(Fraction(2), 1))