Skip to content

Instantly share code, notes, and snippets.

@kadirmalak
Last active December 9, 2018 17:53
Show Gist options
  • Save kadirmalak/f941e7756e50fe4ed5c6013cb95cdf46 to your computer and use it in GitHub Desktop.
Save kadirmalak/f941e7756e50fe4ed5c6013cb95cdf46 to your computer and use it in GitHub Desktop.
# dummy implementation just to show the intent
def for1(list1, list2, list3):
for i in list1:
for j in list2:
for k in list3:
yield (i, j, k)
for i in for1(['a', 'b', 'c'], [1, 2], ['asd']):
print(i)
# outputs
# ('a', 1, 'asd')
# ('a', 2, 'asd')
# ('b', 1, 'asd')
# ('b', 2, 'asd')
# ('c', 1, 'asd')
# ('c', 2, 'asd')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment