title: Python - One line if-elif-else statement
body: <p>I'm trying to condense an if-elif-else statement into one line. I tried:</p>
  
  <pre><code>a == 1 ? print "one" : a == 2 ? print "two" : print "none"
  </code></pre>
  
  <p>But I got a syntax-error. I have also tried:</p>
  
  <pre><code>print "one" if a == 1 else print "two" if a == 2 else print "none"
  </code></pre>
  
  <p>But I also got a syntax-error.</p>
  
  <p>What can I do to make any of these answers better or create a working answer?</p>