python-整数截断(向上取整,向下取整) listen_li 2020-02-01 209 阅读1分钟 import math math.floor(2.5) 2 math.floor(-2.5) -3 math.trunc(2.5) 2 math.trunc(-2.5) -2