You can try the list comprehension.
Here is an example:
>>> x=[1,2,3]>>> y=[11,12,3,4]>>> [(i,j) for i in x for j in y if i!=j][(1, 11), (1, 12), (1, 3), (1, 4), (2, 11), (2, 12), (2, 3), (2, 4), (3, 11), (3, 12), (3, 4)]>>>