Computer Science, asked by akaTnT9, 11 months ago

program to sum all the items in the give list [3,6,8,11,5,6]​ in python

Answers

Answered by vcharithacherry
2

Answer:

# Python program to find sum of elements in list  

total = 0

# creating a list  

list= [3,6,8,11,5,6]  

# Iterate each element in list  

# and add them in variable total  

for i in range(0, len(list)):  

total = total + list[ i ]  

# printing total value  

print("Sum of all elements in given list: ", total)  

Output:

Sum of all elements in given list:  39

Explanation:

Similar questions