📅  最后修改于: 2022-03-11 14:45:54.336000             🧑  作者: Mango
代码示例1
x = [2, 4, 7, 12, 3]
sum_of_all_numbers= sum(x)
or
x = [2, 4, 7, 12, 3]
sum_of_all_numbers= reduce(lambda q,p: p+q, x)