title: How to write python lambda with multiple lines?
body: <p>In python, how can you write a lambda function taking multiple lines. I tried</p>
  
  <pre><code>d = lambda x: if x:
                   return 1
                else 
                   return 2
  </code></pre>
  
  <p>but I am getting errors...</p>