2022年9月6日

随记-随时编辑

摘要: Python reduce() 函数(python3.X需导入) from functools import reducedef add(x, y) : # 两数相加 return x + ysum1 = reduce(add, [1,2,3,4,5]) # 计算列表和:1+2+3+4+5print 阅读全文

posted @ 2022-09-06 20:52 lulu66 阅读(24) 评论(0) 推荐(0)

导航