title: How does one obtain a boolean value given a variable having a value 'Y' or 'N' in Python 3?
body: <p>I get an input as 'Y' or 'N'.  I need to convert that to True if 'Y'or False otherwise.  I came across this construct for this purpose.  The code works but I do not know what it is called.</p>
  <pre><code>    goto = &quot;Y&quot;
      __goto = (False,True)[goto==&quot;Y&quot;]
  </code></pre>
  <p>Can someone explain how this works ? And what this construct is called ?</p>