title: Python - assign value and check condition in IF statment
body: <p>I have this code:</p>
  
  <pre><code>str = func(parameter)
  if not str:
     do something.
  </code></pre>
  
  <p>the function <code>func()</code> return a <code>string</code> on success and <code>''</code> on failure.
  The <code>do something</code> should happen only if <code>str</code> actualy contain a string.</p>
  
  <p>Is it possible to do the assigmnt to str on the <code>IF</code> statment itself?</p>