a guest Feb 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import itertools
- sets = 
- for i in range(n):
- sets += [A[i]] # A[i] is a list [a_1, a_2,... , a_n]
- for i in itertools.product(*sets):
RAW Paste Data