Suppose I have two dictionaries
a = {'milk':90, 'coffee':80, 'rice':100, 'Cheese': 70}
b = {'milk':90, 'coffee':80, 'pulses': 100,'Alcohol':750}
I want to merge these two dictionaries by adding value of common elements of the dictionaries which should give resultant as:
c = {'milk':180, 'coffee':160, 'rice':100, 'Cheese':70, 'pulses':100, 'Alcohol':750}
I am trying this at my level , please suggest if anyone have a solution for this.