How to exclude cases from comprehension
<p>I am trying to exclude cases on a comprehension which return a None.
The following achieves it but results in calling the function twice!!!    </p>

<pre><code>&gt;&gt;&gt; def func(x):
...     if x&gt;10:
...         return None
...     else:
...         return x*2
...         
&gt;&gt;&gt; result1=[func(x) for x in l if func(x) is not None]
&gt;&gt;&gt; result1
[4, 8, 14, 6]
</code></pre>

<p>What would be the way out?</p>
