擅长:python、mysql、java
<p>一个简单的<em>O(n^2)</em>解决方案:</p>
<pre><code>a = [dict1, dict2, dict3]
b = [dict1, dict2, dict4, dict5, dict6]
c = dicts_from_a_not_in_b = [x for x in a if x not in b]
d = dicts_from_b_not_in_a = [x for x in b if x not in a]
</code></pre>