 <p>You could use sets for that, but a <code>dict</code> can not be added to a set unfortunately. You need to 'cast' the dictionaries to something that a set <em>can</em> handle, e.g. a immutable type such as a sequence of tuples. Combine that with an index to return the referenced <code>dict</code>:</p> <pre><code>def magicFunction(a, b): a = [tuple(sorted(d.items())) for d in a] b = [tuple(sorted(d.items())) for d in b] return [dict(kvs) for kvs in set(a).difference(b)] </code></pre> <p>Result:</p> <pre><code>&gt;&gt;&gt; firstDict = [{'A':1 ,'B':1}, {'A':2 ,'B':2}] &gt;&gt;&gt; secondDict = [{'A':3 ,'B':3}, {'A':2 ,'B':2}] &gt;&gt;&gt; magicFunction(firstDict, secondDict) [{'A': 1, 'B': 1}] &gt;&gt;&gt; magicFunction(secondDict, firstDict) [{'A': 3, 'B': 3}] </code></pre>