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
# 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)
Output
1225