I have this:
dict1 = {"a":3, 'b':4}
dict2 = {"a":6, 'b':5}
I need to get to this:
target_dict = {"a":[3,6], 'b':[4,5]}
I tried and it doesn't work.
from collections import defaultdict
target_dict = defaultdict(list)
dict1 = {"a": [3], 'b':[4]}
dict2 = {"a": [6], 'b':[5]}
target_dict.append(dict1)
target_dict.append(dict2)
target_dict
Please help.