Suppose:
dict1 = {'a': {'b': 2, 'c': 3}, 'd': 4}
dict2 = {'a': {'b': 1, 'd': 4}, 'c': 3}
Then merging both dict1 and dict2, I should get
{'a': {'b': 3, 'c': 3, 'd': 4}, 'c': 3, 'd': 4}
When both have same key, then add there values together , i.e., in this case for b : ( 2+1) (actually it could be integer or list).
Is there any pythonic way to do this. The only way that strikes to mind is to loop over all the keys and values, but I queries that there should be another way.