Skip to content

Instantly share code, notes, and snippets.

@yamad
Last active August 20, 2018 21:57
Show Gist options
  • Save yamad/980b413e20db19e40cae2a527fe3c522 to your computer and use it in GitHub Desktop.
Save yamad/980b413e20db19e40cae2a527fe3c522 to your computer and use it in GitHub Desktop.
my python zip
def myzip(*args):
iters = [iter(a) for a in args]
while True:
try:
yield tuple([next(it) for it in iters])
except StopIteration:
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment