Skip to content

Instantly share code, notes, and snippets.

@forrestchang
Last active February 22, 2017 13:23
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 forrestchang/4182afd33f75a7754ce992a6be725819 to your computer and use it in GitHub Desktop.
Save forrestchang/4182afd33f75a7754ce992a6be725819 to your computer and use it in GitHub Desktop.
itertools.chain(*iterables)
def chain(*iterables):
# chain('ABC', 'DEF') => A B C D E F
for it in iterables:
for element in it:
yield element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment