Question: Note: function should not modify di. 3) Write a function called reverse(di) that takes a dictionary as an argument; both the keys and values of
Note: function should not modify di.
3) Write a function called reverse(di) that takes a dictionary as an argument; both the keys and values of the dictionary will be postive integers. The function should return a new dictionary with the keys and values of di reversed. For example, if di is {42425:2:13:100:7} then the function should return {2:413:2100:427:5}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
