Skip to main content

Program To Sum All The Items In A List

· One min read
Kaustubh Kulkarni
file.py

# Write a program to sum all the items in a list
list1=[*range(1,50)]
#print(list1)
sum=0
for i in list1:
sum+=i
print(sum)
file.py
Output
1225