title: (Set) Comprehension from multiple values
body: <p>Suppose I’ve got a list <code>l = [1,2,3]</code> and I want to create a set of all numbers in that list and their squares. Ideally, in a single comprehension expression.</p>
  
  <p>Best I can come up with is (two iterations over the list):</p>
  
  <pre><code>set(_ for _ in l).union(_ * _ for _ in l)
  </code></pre>