title: How to check in python if variable is not None and greater than something in one line?
body: <p>How make this statement in one line? </p>
  
  <pre><code>if x is not None:
      if x &gt; 0:
          pass
  </code></pre>
  
  <p>if I write with just 'and' it shows exception if None</p>
  
  <pre><code>if x is not None and x &gt; 0:
       pass
  </code></pre>