For example I have two dictionaries d1 and d2
d1 = {'a': ['b','c'], 'd': ['e', 'f']}
d2 = {'b':[1, 2], 'c': [3, 4], 'd': [5, 6], 'e': [7, 8], 'f': [9, 10]}
I expect a new dictionary d3 that looks like
d3 = {'a':{'b':[1, 2], 'c': [3, 4]}, 'd': {'e': [7, 8], 'f': [9, 10]}}
I have tried all kinds of looping but it does not work.