Question: in python Function name: get_restaurants Parameters: a dictionary containing restaurants as keys and their values being a list of the items that they serve Returns:
in python

Function name: get_restaurants Parameters: a dictionary containing restaurants as keys and their values being a list of the items that they serve Returns: a dictionary containing the items as keys and their values being a list Description: Now that you're in New York City, you are trying to find the locations that serve specific food items, but you only have the restaurant names and their menus. Write a function called get restaurants that takes in a dictionary with the restaurant names as keys and a list of the items they sell. You should return a dictionary containing the items as keys and their values being a list of the restaurants that serve that item >iceCreamPlaces "Mister Dips": ["ice cream"], "Morgenstern's Finest: ['ice cream"], "The Original Chinatown Ice Cream": ["ice cream"]) iceCream - get_restaurants (iceCreamPlaces) >print(iceCream) ice cream': [Mister Dips', "Morgenstern's Finest", The Original Chinatown Ice Cream] >chineseRestaurants Red Farm" ["dumplings", "hot and sour soup"], "Kung Fu Little Steamed Buns": ["'dumplings", "noodles"], "Hunan Slurp": ['noodles", "dumplings"] "Xi'an Famous Foods": ["noodles"T >> chineseFoods - get_restaurants(chineseRestaurants) >>> print(chineseFoods) (dumplings': ['Red Farm', 'Kung Fu Little Steamed Buns', 'Hunan Slurp'], 'hot and sour soup: [Red Farm], noodles': [Kung Fu Little Steamed Buns', Hunan Slurp, "Xi'arn Famous Foods"]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
