title: How to check single line if else if else condition in Python
body: <p>I have three different answers for <em>holiday_type</em></p>
  
  <pre><code>holiday_type = Approved
  holiday_type = Confirmed
  holiday_type = both
  </code></pre>
  
  <p>Python Code:</p>
  
  <pre><code> result = ['confirm','validate'] if holiday_type == 'both' else ['confirm'] if holiday_type == 'Confirmed' else ['validate']
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>['validate']                // Approved
  ['confirm']                 // Confirmed
  ['confirm', 'validate']     // both
  </code></pre>
  
  <p>I can't understand how to compile this if else statement: which one first which one second. Can you please explain how to compile this condition flow.</p>