Question: 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

 3) Write a function called reverse (di) that takes a dictionary

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 {4:22:13,42:100,5:7} then the function should return {2:413:2,100:42,7: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!