title: how does "x:set() for x in y" work?
body: <p>I was looking at a python code which implemented topological sort and found the following code </p>
  
  <pre><code>data.update({item:set() for item in extra_items_in_deps})
  </code></pre>
  
  <p>I know what <code>data.update</code> does but am not sure how this: </p>
  
  <pre><code>item:set() for item in extra_items_in_deps  
  </code></pre>
  
  <p>works.</p>