title: Is it possible to write single line return statement with if statement?
body: <p>Is is possible to return from a method in single line in python</p>
  
  <p>Looking for something like this</p>
  
  <pre><code>return None if x is None
  </code></pre>
  
  <p>Tried above, and it is invalid syntax</p>
  
  <p>I could easily do:</p>
  
  <pre><code>if x is None:
      return None
  </code></pre>
  
  <p>But just curious if I can combine above if statement into a single line</p>