Contact: aviboots(AT)netvision.net.il
39,862 questions
51,784 answers
573 users
from itertools import product lst1 = [1, 2, 3, 4] lst2 = [8, 9] lst = list(product(lst1, lst2)) print(lst) ''' run: [(1, 8), (1, 9), (2, 8), (2, 9), (3, 8), (3, 9), (4, 8), (4, 9)] '''