Can someone give me advise how to merge two dictionaries ( Beginner here) for my case . For the keys common, I want to append the values. If key is there in one and not the other dictionary, I want to add 0 as value in the merged dictionary .
d1 = {'David': '5.5', 'John': '1.0', 'Tim' : '2' }
d2 = {'David': '42.5', 'John': '37.0'}
Desired output
d3 = {'David' : ['5.5', '42.5'], 'John' : ['1.0', '37'], 'Tim' : ['2','0']}