Python condense if/else to one line?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/394809/python-ternary-operator">Python Ternary Operator</a><br>
  <a href="http://stackoverflow.com/questions/2802726/putting-a-simple-if-then-statement-on-one-line">Putting a simple if-then statement on one line</a>  </p>
</blockquote>



<p>Is there a way to compress an if/else statement to one line in Python? I oftentimes see all sorts of shortcuts and suspect it can apply here too.</p>
