摘要:
import mathf = 29.4print(math.ceil(f)) #向上取整print(math.floor(f)) #向下取整print(round(f)) #四舍五入输出302929 阅读全文
摘要:
from functools import reducedef func (x,y): return x+yprint(reduce(func,range(101)))print(reduce(lambda x, y: x+y, range(101))) 阅读全文