python round value code example Example 1: round to the nearest integer python int(round(x)) Example 2: rounding numbers in python >>> round(2.5) 2