Python program: Write a Python program to sum all the items in a list.

Python program: Write a Python program to sum all the items in a list.

list_items = [1,2,3,4,5]
sum = 0

for i in list_items:
    sum = sum+i
    
print(sum)

Post a Comment

0 Comments