num = [1,2,3,4,100] #求列表中数字的和from functools import reduce#使用reduce前必须先倒入模块a = reduce(lambda x,y:x+y,num,1)print(a)