Skip to content

Instantly share code, notes, and snippets.

@oguzalb
Created February 15, 2021 01:19
Show Gist options
  • Save oguzalb/e9dee5c3a7bef1d3296099c53b5a34d2 to your computer and use it in GitHub Desktop.
Save oguzalb/e9dee5c3a7bef1d3296099c53b5a34d2 to your computer and use it in GitHub Desktop.
generator1 = (a for a in [1, 2, 3, 4])
generator2 = (a for a in [1, 2, 3])
for x1, x2 in zip(generator1, generator2):
print(x1, x2)
remainder = next(generator1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment