You want itertools.product:
>>> import itertools
>>> a = [1,2]
>>> b = [4,5]
>>> list(itertools.product(a,b))
[(1, 4), (1, 5), (2, 4), (2, 5)]
You want itertools.product:
>>> import itertools
>>> a = [1,2]
>>> b = [4,5]
>>> list(itertools.product(a,b))
[(1, 4), (1, 5), (2, 4), (2, 5)]