How to combine 2 lists in such a way that each element in list 2 is combined with the elements in list 1 so that “a” combines with only one element in list 1 in each iteration then “b” combines with only two elements in the list 1 in each iteration.
list1= [1,2,3]
list2= [‘a’,‘b’,‘c’,‘d’,‘e’]
dict_list_2 = {‘a’ : 1 , ‘b’ : 2 , ‘c’ : 3 , ‘d’ : 4 , ‘e’ :5}
Expected Output: ('a',1) (a ,2 ) (a , 3) (b , 1 ,2) (b , 1 ,3) (b , 2 ,3) (b , 1 ,1) (b , 2 ,2) (b , 3 ,3) –