Can someone explain this conditional assignment?
<p>I'm having trouble understanding the following line:</p>

<pre><code>result = (status!=None and "off" or "on")
</code></pre>

<p>Now when this is called, only <code>status</code> has been assigned a value (the result of a regular expression search). However, after this command, <code>result</code> takes the value of "on" or "off". </p>

<p>To my untrained eye, this just looks like a comparison. How is this assignment happening?</p>
