Skip to content

Instantly share code, notes, and snippets.

Last active October 27, 2020 10:38
What would you like to do?
from itertools import cycle
count = 0
iterable = ["Python", "is", "awesome."]
generator = cycle(iterable)
for i in range(6):
print(next(generator, end = ' ')
Python is awesome. Python is awesome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment