It may be a classical question in Python, but I haven't found the answer yet.
I have a list of dictionaries, these dictionaries have similar keys. It looks like this:
[{0: myech.MatchingResponse at 0x10d6f7fd0,
3: myech.MatchingResponse at 0x10d9886d0,
6: myech.MatchingResponse at 0x10d6f7d90,
9: myech.MatchingResponse at 0x10d988ad0},
{0: myech.MatchingResponse at 0x10d6f7b10,
3: myech.MatchingResponse at 0x10d6f7f90>}]
I would like to get a new dictionary with [0,3,6,9] as keys, and lists of " myech.MatchingResponse" as values.
Of course I can do this using a simple loop but I was wondering if there is a more efficient solution.