title: How does lambda x: (x % 2 and 'odd' or 'even') work
body: <p>I was learning about lambda functions, and saw this example. I cannot understand how, 'odd', or 'even' is selected.</p>
  
  <pre><code>print((lambda x: (x % 2 and 'odd' or 'even'))(3))
  </code></pre>
  
  <p>returns odd</p>
  
  <pre><code>print((lambda x: (x % 2 and 'odd' or 'even'))(4))
  </code></pre>
  
  <p>returns even</p>