Question: Write the function merge_dicts(L) that takes in a list of dictionaries and non-destructively merges them. For example if L = [{a: 1, b: 2, c:
Write the function merge_dicts(L) that takes in a list of dictionaries and non-destructively merges them.
For example if L = [{"a": 1, "b": 2, "c": 3}, {"a": 4, "b": 2, "c": 3}], then merge_dicts(L) should return {"a": {1, 4}, "b": 2, "c": 3}
Step by Step Solution
There are 3 Steps involved in it
A function mergedicts in Python to nondestructively merge a list of dictionaries as described He... View full answer
Get step-by-step solutions from verified subject matter experts
