How can I turn the following list:
[{'xx1': {'test1': 8}}, {'xx1': {'test3': 2}}, {'yy2': {'test1': 5}}, {'yy2': {'test5': 6}}]
into
[{'xx1' : {'test1': 8, 'test3':2}, 'yy2' : {'test1': 5, 'test5': 6}}]
What is the syntactically cleanest way to accomplish this? Or, how can it be done by using reduce()
?
Thanks for any help!!