demo_iterator.py:
mytuple = ("apple", "banana", "cherry") myit = iter(mytuple) print(next(myit)) print(next(myit)) print(next(myit))
C:\Users\My Name>python demo_iterator.py
apple
banana
cherry