Suppose there are 2 dictionaries:
A = {'a':1, 'b':2, 'c':3}
B = {'c':2, 'd':2, 'e':4}
How do I merge them together to obtain:
C = {'a':1, 'b':2, 'c':5, 'd':2, 'e':4}
I know that A.update(B)
will give me a merged dictionary but the value that I want for 'c' in A would be over-written by the value held by 'c' in B instead of being added.