How to express this python code block in one line?
<p>I am trying to optimise below logical block into one single line.</p>

<p>The single line is because I need to embed this into a parameter, in a software package. How I can include some variable declarations at the head of this line? I mean, I need to have the <code>switch</code> variableses declared on that one single line as well.</p>

<p>Is this possible?</p>

<pre><code>switch1 = 1
switch2 = 0
if switch1 != 0:
    if switch2 == 1:
        result = a == b
        return int(result)
    else:
        result = c == d
        return int(result)
else:
    return 0
</code></pre>
