📌  相关文章
📜  如何在 python 代码示例中将整数添加到列表中

📅  最后修改于: 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)