I have got a list of dictionaries,
_list = [
{"a": [1, 20, 20, 40], "b": [0, 14, 14, 28]},
{"a": [2, 20, 20, 40], "b": [2, 14, 14, 28]},
{"c": [1, 20, 20, 40], "d": [0, 14, 14, 28]},
]
I want to merge these dict and get a single dict, I want their values which are lists to be merged if the key is same and I expect the final result like this:
_dict = {
"a": [3, 40, 40, 80],
"b": [2, 28, 28, 56],
"c": [1, 20, 20, 40],
"d": [0, 14, 14, 28]
}
I have no idea where to start and what approach to follow, can you please help me to get the desired output? Thanks