if else statement in boolean operations : <pre><code>L = [1,2,3,4,5]
r = None
for item in L:
#if item is odd or 0 bind it to r. if r is None then 0
    if (item % 2 or item == 0) and item &gt;= 0 if r == None else r:
        print(r)
        r = item
</code></pre>

<p>This prints:</p>

<pre><code>None
1
2
3
4
</code></pre>

<p>It is not clear why boolean operator works like this, it clearly lets 2 and 4 through even if both of them are even numbers.</p>
