Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created September 14, 2020 15:08
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 BetterProgramming/ae7520645e8835c76ad052820f862f3f to your computer and use it in GitHub Desktop.
Save BetterProgramming/ae7520645e8835c76ad052820f862f3f to your computer and use it in GitHub Desktop.
import itertools
num = itertools.starmap(lambda x, y: x + y, [(0, 1), (1, 2), (2, 3)])
for i in num:
print(i)
'''
Output:
1
3
5
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment