title: only positive numbers in list comprehension in python
body: <p>Trying to create a list of positive numbers using single line but it's not working for me. Need help</p>
  
  <pre><code>numbers = [34.6, -203.4, 44.9, 68.3, -12.2, 44.6, 12.7]
  </code></pre>
  
  <p>My code : </p>
  
  <pre><code>newlist = [n if n&gt;0 else pass for n in numbers]
  </code></pre>
  
  <p>why <code>else pass</code> is not working? </p>