Problem
I have two dictionaries: a and b
a={'e':[1,2]}
b={'d':[11,22]}
How can I convert them to a dictionary of dictioneries that contains all possible combinations of the lists [1,2] and [11,22]. The expected result should be:
dic={1:{'e':1,'d':11},
2:{'e':2,'d':22},
3:{'e':1,'d':11},
4:{'e':2,'d':22}}
My attemt:
I can easily get the combinations of two lists or any set of lists using itertools like so:
l=list(itertools.product([1,2],[11,22]))
But I don't know how to proceed from here. Any suggestions?