Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python sum array

# python: how to sum an array

array = [1, 1, 2, 0, -1]
sum_array = sum(array)

print(sum_array)
# 3
 
PREVIOUS NEXT
Tagged: #python #sum #array
ADD COMMENT
Topic
Name
5+4 =