Skip to main content

Program to demonstrate Iterator in Python

· One min read
Kaustubh Kulkarni

Que > Program to demonstrate Iterator in Python

file.py
arr={10,20,30,40,50,60,70}
sum=0
for i in arr:
sum+=i
print(sum)
Output
280