I have a dictionary of lists and want to combine the keys which share duplicate lists into a seperate list within a dictionary that also contains the original list that they all share.
I have tried to use existing solutions that work for hashable type such as when the dictionary just contains strings as the values. Relevant SO question can be found here. Each time I attempt any of these solutions or any others I have tried using similar techniques all result in an unhashable type error.
Here is an example of what my dictionary looks like.
exampledict = {'FOO': [1, 2, 3, 4, 25, 9], 'BAR': [1, 2], 'BAZ': [1, 2], 'ABC': [1, 2, 3, 4, 25, 9]}
The correct output should be two dictionaries:
finaldict1 = {'keys': ['BAR', 'BAZ'], 'value': [1, 2]}
finaldict2 = {'keys': ['FOO', 'ABC'], 'value': [1, 2, 3, 4, 25, 9]}