Question: Write a function SecondD() that takes as parameters two dictionaries and returns a dictionary built out of the parameter dictionaries. The returned dictionary should contain
Write a function SecondD() that takes as parameters two dictionaries and returns a dictionary built out of the parameter dictionaries. The returned dictionary should contain the intersection of the two dictionaries, meaning the key-value pairs that can be found in both dictionaries. Any key-value pair that is not found in identical form in both dictionaries will not be included in the returned dictionary. If the two dictionaries do not have any key-value pairs in common, the function will return the empty dictionary. Neither of the parameter dictionaries should be changed by the function.
This is the output in python please

Python 3.6.4 Shell File Edit She Debug Options Window Help >>> d1 -f'testi': 1, test2': 2, 'test3': 3) >>> d2 -testi' 1, 'test2': 2.5, test4': 41 >>> d - intersect (d1, d2) f'testl: >>> d1 'testi: 1, >>d2 'test1': 1, test2': 2.5, 'test4':4 >>> d3 - ( (1, 2): three') >>> d - intersect (d1, d3) 'test 2':2,'test3 : 3) >>> d-intersect (d2, d2) 'test4' 4} { 'test1': 1, 'test2" : 2.5, >>> idid) 2152193 617136 >>d2 : >>> id(d2) 2152 193 617568 Ln: 120 Col: 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
