title: How to compare python lists of dicts for unordered sameness?
body: <p>I have the following 8 (possibly non-unique) lists in python:</p>
  
  <pre><code>&gt;&gt;&gt; a = [{9: {10:11}}, {}, {}]
  &gt;&gt;&gt; b = [{1:2}, {3:4}, {5:6}]
  &gt;&gt;&gt; c = [{}, {}, {}]
  &gt;&gt;&gt; d = [{1:2}, {3:4}, {5:6}]
  &gt;&gt;&gt; w = [{}, {}, {}]
  &gt;&gt;&gt; x = [{1:2}, {3:4}, {5:6}]
  &gt;&gt;&gt; y = [{}, {}, {}]
  &gt;&gt;&gt; z = [{1:2}, {3:4}, {5:6}]
  </code></pre>
  
  <p>I want to check if any combination of (a,b,c,d) is the same as any combination of (w,x,y,z). IE: if <code>{a, b, c, d} == {w, x, y, z}</code>. However, because of the datatypes of these lists, I cannot easily put them into a set. They are unhashable.</p>
  
  <p>What's the most pythonic way to do it?</p>
  
  <p>I wanted to do the following but it didn't work:</p>
  
  <pre><code>&gt;&gt;&gt; set([a,b,c,d]) == set([w,x,y,z])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unhashable type: 'list'
  </code></pre>
  
  <p>So then I tried the following, but it didn't work either:</p>
  
  <pre><code>set([tuple(i) for i in [a,b,c,d]]) == set([tuple(i) for i in [w,x,y,z]])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: unhashable type: 'dict'
  </code></pre>
  
  <p>How can I write something pretty and efficient that will do the comparison that I need?</p>