Run »
x = iter(["apple", "banana", "cherry"]) print(next(x)) print(next(x)) print(next(x))
apple
banana
cherry