📜  python reduce函数对数组求和 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:19.007000             🧑  作者: Mango

代码示例1
from functools import reduce

scores = [3, 3, 80, 3, 1]
total = reduce(lambda x, y: x + y, scores)
print(total)