Skip to content

Instantly share code, notes, and snippets.

@pykong
Last active November 13, 2017 19:40
Show Gist options
  • Save pykong/65c92a36c7ac49d8e80a57d1d7e46060 to your computer and use it in GitHub Desktop.
Save pykong/65c92a36c7ac49d8e80a57d1d7e46060 to your computer and use it in GitHub Desktop.
from itertools import cycle
lst = ['a', 'b', 'c']
pool = cycle(lst)
for item in pool:
print(item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment