Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def comb(l1, l2, l3):
- for e1 in l1:
- for e2 in l2:
- for e3 in l3:
- yield (e1, e2, e3)
- raise StopIteration()
- for c in comb([0,1,2], [0,1], [0,1]):
- print c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement