Differentiating two dictionaries key sets to generate result dictionary
<p>I have,</p>

<pre><code>dict1={a:1, b:2, c:3}
dict2={a:3, c:7}
</code></pre>

<p>I want to find out what keys I have in dict1 that I don't have in dict2.  So I do</p>

<pre><code>diff_as_set = set(dict1.keys()) - set (dict2.keys())
</code></pre>

<p>This gives me: <code>b</code></p>

<p>However, I want a dictionary which contains all the key value mappings from dict1 for all keys that are not in dict 2 so I then do:</p>

<pre><code>diff_as_dict = {k:v for k,v in dict1 if k in diff_as_set}
</code></pre>

<p>I get:</p>

<pre><code>diff_as_dict = {k:v for k, v in dict1 if k in diff_as_set}
ValueError: too many values to unpack (expected 2)
</code></pre>

<p>Any ideas?</p>
