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

Solutions on MaxInterview for how do i add the integers in a list with itsself in python by the best coders in the world

showing results for - "how do i add the integers in a list with itsself in python"
Jacobo
21 Aug 2020
1x = [2, 4, 7, 12, 3]
2sum_of_all_numbers= sum(x) 
3
4or
5
6x = [2, 4, 7, 12, 3] 
7sum_of_all_numbers= reduce(lambda q,p: p+q, x)