Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list sum

To get the sum of a list in python, you just call the built in sum() function.
An example:

>>> lst = [3, 7, 1, 9, 4]
>>> sum(lst)
24
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #sum
ADD COMMENT
Topic
Name
5+7 =