Question: '''Define a function reverseDict() that takes one parameter: - fansClub, a dictionary of key: value pairs, where the key is the name of a soccer

'''Define a function reverseDict() that takes one parameter: - fansClub, a dictionary of key: value pairs, where the key is the name of a soccer fan and the value associated with that key is the list of soccer teams he/she is a fan off. The function returns a dictionary of key:value pairs, where the key is a soccer team and the value is the list of all names of its fans. for example, fans={'js':['Real Madrid','Juventus','Spain'], 'john': ['Real Madrid','France'], 'Alissa':['Roma','France']} print(reverseDict(fans)) {'Real Madrid': ['js','john'], 'Juventus':['js'], 'Spain':['js'], 'France':['john','Alissa'], 'Roma': ['Alissa']} ''' 

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!