Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python sumproduct excel

list1 = [1, 2, 3]
list2 = [4, 5, 6]

product_for_sum = []
for i in range(0, len(list1)):
   product_for_sum.append(list1[i]*list2[i])
sumproduct = sum(product_for_sum)

print(sumproduct)
# (1*4) + (2*5) + (3*6)
# = 4 + 10 + 18
# = 32 
Source by support.microsoft.com #
 
PREVIOUS NEXT
Tagged: #python #sumproduct #excel
ADD COMMENT
Topic
Name
6+1 =