This question is similar to the post "Python - Convert list of single key dictionaries into a single dictionary", where the assumption is that we guarantee different keys in the list of dictionaries. My question here is, what if we have similar keys and how we can utilize the reduce function.
For example, we have:
lst = [{'1': 'A'}, {'1': 'B'}, {'2': 'C'}, {'2': 'D'}, {'3': 'E'}]
And we want to be:
dict = {'1': ['A', 'B'], '2': ['C', 'D'], '3': ['E']}
In addition, the post How to merge multiple dicts with same key? is similar, except that here we would like to utilize the reduce method.