Skip to content

Instantly share code, notes, and snippets.

@reusee
Created October 22, 2016 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reusee/eee942ee2b5f750558f158e3f8a2c530 to your computer and use it in GitHub Desktop.
Save reusee/eee942ee2b5f750558f158e3f8a2c530 to your computer and use it in GitHub Desktop.
import itertools
def l():
while True:
for e in ['a', 'b', 'c', 'd']:
yield e
print(list(itertools.islice(l(), 7)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment