我不知道Python 中的标准函数,但这对我有用:. 蟒蛇3. def myround(x, base=5): return base * round(x/base). 很容易理解为什么上述方法有效。
確定! 回上一頁