python rounding a decimal to 3 places code example Example: how to round a float in python round(number, ndigits)