Question: Exercise 5 Write a function dMerge that takes two dictionaries dl and d2 and returns another dictionary (combination of d1 and d2). The function is

 Exercise 5 Write a function "dMerge" that takes two dictionaries "dl"

Exercise 5 Write a function "dMerge" that takes two dictionaries "dl" and "d2" and returns another dictionary (combination of d1 and d2). The function is to add values for common keys. Sample Input di -'a': 250, 'b 100, "c':600) d2-'a': 150, 'b': 450, 'd':300 Sample Output d3-'a': 400, 'b': 550, :600, 'd':300)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!