title: Get dictionary of all dictionary keys that share the same list value and their common value
body: <p>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.</p>
  
  <p>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 <a href="https://stackoverflow.com/questions/25517504/how-to-get-list-of-keys-that-share-a-value-with-another-key-within-the-same-dict">here</a>. Each time I attempt any of these solutions or any others I have tried using similar techniques all result in an unhashable type error.</p>
  
  <p>Here is an example of what my dictionary looks like.</p>
  
  <pre><code>exampledict = {'FOO': [1, 2, 3, 4, 25, 9], 'BAR': [1, 2], 'BAZ': [1, 2], 'ABC': [1, 2, 3, 4, 25, 9]}
  </code></pre>
  
  <p>The correct output should be two dictionaries:</p>
  
  <pre><code>finaldict1 = {'keys': ['BAR', 'BAZ'], 'value': [1, 2]}
  finaldict2 = {'keys': ['FOO', 'ABC'], 'value': [1, 2, 3, 4, 25, 9]}
  </code></pre>