I have two dictionaries:
d1 = {'Cat': {'White': 1}, 'Dog': {'Brown': 4, 'White': 2}}
d2 = {'Cat': {'Grey': 6, 'White': 3}, 'Rabbit': {'Brown': 4, 'White': 2}}
And I want to combine these dictionaries into a single dictionary while updating values for common values in the sub-dictionaries of d1 and d2 for matching keys in d1 and d2.
So if I combine d1 and d2, I would like to get:
combined = {'Cat': {'Grey': 6, 'White': 4}, 'Dog': {'Brown': 4, 'White': 2}, 'Rabbit': {'Brown': 4, 'White': 2}}
I am new to python so any help is appreciated.