title: Efficiently filtering out 'None' items in a list comprehension in which a function is called
body: <p>I have a list comprehension that calls a function which potentially returns <code>None</code>.</p>
  
  <pre><code>&gt;&gt;&gt; f = lambda x: x if x &lt; 3 else None
  &gt;&gt;&gt; l = [f(x) for x in [1,2,3,4]]
  [1, 2, None, None]
  </code></pre>
  
  <p>I'd like to have the list comprehension as above, without the 'None' entries. </p>
  
  <p>What's a more efficient way to do the following, without creating additional overhead, and while retaining the efficiency of the list comprehension?</p>
  
  <pre><code>&gt;&gt;&gt; filter(None, [f(x) for x in [1,2,3,4]])
  [1, 2]
  </code></pre>