title: Python ternary operator
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python">Ternary conditional operator in Python</a>  </p>
  </blockquote>
  
  
  
  <pre><code>var foo = (test) ? "True" : "False";
  </code></pre>
  
  <p>What would this look like in Python?</p>
  
  <p>Using Python 2.7 if that makes a difference. </p>