[Solved]Function Name Merge Dicts Parameters Dictionary Dictionary Returns Dictionary Description Q37066555
in python please 🙂
Function name: merge dicts Parameters: dictionary, dictionary Returns: dictionary Description: Given two separate dictionaries, merge them together to form a new dictionary where each unique key between the two dictionaries is mapped to a tuple of the values at those keys from the two given dictionaries. When creating the tuple, the first value should be from the first dictionary, and the second value should be from the second dictionary. If a key does not exist in one dictionary, then that dictionary’s tuple value for that key should be None Test Case: >>> a = {” pet”: ”doo”, “аде”: 20, ”housing”: ”home park”} >>> b – (“dinner” “willage”, “age”: 19, “housing”: “montag” >>> print (merge dicts (a, b)) (”pet” : (“dog”, None), “аде ” : (20, 19), “housing”: (“home park”, “montag”),”dinner”: (None, “willage”)) Show transcribed image text Function name: merge dicts Parameters: dictionary, dictionary Returns: dictionary Description: Given two separate dictionaries, merge them together to form a new dictionary where each unique key between the two dictionaries is mapped to a tuple of the values at those keys from the two given dictionaries. When creating the tuple, the first value should be from the first dictionary, and the second value should be from the second dictionary. If a key does not exist in one dictionary, then that dictionary’s tuple value for that key should be None Test Case: >>> a = {” pet”: ”doo”, “аде”: 20, ”housing”: ”home park”} >>> b – (“dinner” “willage”, “age”: 19, “housing”: “montag” >>> print (merge dicts (a, b)) (”pet” : (“dog”, None), “аде ” : (20, 19), “housing”: (“home park”, “montag”),”dinner”: (None, “willage”))
Expert Answer
Answer to Function name: merge dicts Parameters: dictionary, dictionary Returns: dictionary Description: Given two separate dictio… . . .
OR

