Answers for "how do i add the integers in a list with itsself in python"

0

how do i add the integers in a list with itsself in python

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)
Posted by: Guest on January-10-2021

Code answers related to "how do i add the integers in a list with itsself in python"

Python Answers by Framework

Browse Popular Code Answers by Language