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)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

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!