Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to sum all the values in a list in python

numbers = [1,2,3,4,5,6]
print("Sum =", sum(numbers))
print("Sum with 10 =", sum(numbers, 10))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #sum #values #list #python
ADD COMMENT
Topic
Name
9+4 =