Question: Exercise 4 : Write a function that takes two lists as arguments. It creates a dictionary with the first list as keys and the second

Exercise 4: Write a function that takes two lists as arguments. It creates a dictionary with the first list as keys and the second as values. Then, it reverses the dictionary by creating a new one where values are used as keys and the keys as values. In case where the key in the reversed dictionary exists the function should add this key in a list of duplicates. The function should return the reversed dictionary and the duplicate keys.
 Exercise 4: Write a function that takes two lists as arguments.

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!