Find elements NOT in the intersection of two lists
<p>So I know how to find the intersection of two lists by doing:</p>

<pre><code>&gt;&gt;&gt; a = [1,2,3,4,5]
&gt;&gt;&gt; b = [1,3,5,6]
&gt;&gt;&gt; list(set(a) &amp; set(b))
[1, 3, 5]
</code></pre>

<p>But what is the best way to find all the elements that are not included in the intersection. My initial idea is to create a union of the two lists and then remove all the elements from the intersection from the union, as such:</p>

<pre><code>&gt;&gt;&gt; a = [1,2,3,4,5]
&gt;&gt;&gt; b = [1,3,5,6]
&gt;&gt;&gt; intersection = list(set(a) &amp; set(b))
&gt;&gt;&gt; union = list(set(a) | set(b))
&gt;&gt;&gt; non_intersection = intersection - union
[2, 4, 6]
</code></pre>

<p>Is this the best way to do this or is there another way?</p>