I have a dictionary which has the following form:
{ 1:['a','b'],
2:['c','d'],
3:['b','e'],
4:['g','c']
..........
}
I want to find out if any values from the values matches with values in another key and then add it to another dictionary.In this example, in key 1 value 'b' matches with value 'b' in key 3. Si I want to group these together in a new dictionary for example
{100:['a','b''e']}.
Any suggestion on implementation or possible approaches preferably in Python would be highly appreciated.