rounding number to nearest 10 python one line code example Example: how to round to the nearest 25 python def myround(x, base=5): return base * round(x/base)