title: How does the Python conditional operator workaround work?
body: <p>From what I have read, I found that a built-in ternary operator does not exist (I will be happy to know more about it.).</p>
  
  <p>I found the following code as a substitute:</p>
  
  <pre><code>def val():
      var = float(raw_input("Age:"))
      status = ("Working","Retired")[var&gt;65]
      print "You should be:",status
  </code></pre>
  
  <p>I couldn't understand how this code works; can anyone explain me how actually the code is working? I am also interested to know why the ternary operator doesn't exist; any references or links about this will be ore useful. </p>
  
  <p>I'm running Python 2.6.4 on Windows Vista.</p>