Python provides a round function for rounding a float to the nearest integer. For tie-breaking, Python 3 uses round to even: round(1.5) and round(2.5) both produce 2.[93] Versions before 3 used round-away-from-zero: round(0.5) is 1.0, round(-0.5) is −1.0.[94]