Python program to find the sum of elements in a list

mylist=[5,10,15,20,25]
total=0
for i in range(0,len(mylist)):
total=total+mylist[i]
print(“sum of all elements in a given list:”,total)

sum of all elements in a given list: 75

4 Likes

@mayurpuranik9

Good approach, keep it up.

2 Likes