list1 = [a, b, c, d, e, f]
;list2 = [a, b, c]
list3 = [(a, a), (a, b), (a, c), (a, d), (a, e), (a, f), (b, a), (b, b), (b, c), (b, d), (b, e), (b, f), (c, a), (c, b), (c, c), (c, d), (c, e), (c, f)]
from itertools import product
print(list(product("abc", "abcdef")))
result = []
for i in list2:
tmp = [i] * len(list1)
result += list(zip(list1, tmp))
Find more questions by tags AlgorithmsProgrammingPython