python automatically rounding code example Example 1: rounding numbers in python >>> round(2.5) 2 Example 2: python round without math (int(10*x-0.5)+1) / 10.0