# import pandas as pd import pandas as pd # Create two lists i = [1,2,3,4,5] j = [1,2,3,4,5] # List every single x in i with every single y (i.e. Cartesian product) [(x, y) for x in i for y in j] # An alternative way to do the cartesian product # import itertools import itertools # for two sets, find the the cartisan product for i in itertools.product([1,2,3,4,5], [1,2,3,4,5]): # and print it print(i)