Question: Exercise 3 [Merging Dictionaries] Write a function called merge1(d1,d2) that takes two dictionaries as input parameters. This function will create and return a new dictionary
![Exercise 3 [Merging Dictionaries] Write a function called merge1(d1,d2) that takes](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f456e225033_05766f456e1953cb.jpg)
Exercise 3 [Merging Dictionaries] Write a function called merge1(d1,d2) that takes two dictionaries as input parameters. This function will create and return a new dictionary that contains everything from the two input dictionaries and return it. For this problem you can assume that the input dictionaries do not have any keys in common. Create a few dictionaries, print them to screen using the function created above. After this, merge them using the function you wrote and print the result to screen. Do NOT use any built-in methods that do this for you. For example, >>> di = {'A': 100, 'C':300) >>> d2 = ('B': 200, 'D':400) >>> d3 = mergel (di, d2) >>> display (3) A-> 100 B -> 200 D -> 400 C -> 300
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
