Don't understand why (5 | -2) > 0 is False where (5 or -2) > 0 is True : <p>This is a pretty trivial question that I haven't been able to find the answer to. </p>

<p>Here is the problem. I have the following array:</p>

<pre><code>vals = [-5, 2]
</code></pre>

<p>And I want to check whether <code>val[0]</code> or <code>val[1]</code> is greater than 0. If either is true, then I should output True.</p>

<p>My immediate thought was to use; <code>(vals[1] or vals[0]) &gt; 0)</code> but I'm finding that <code>(5 | -2) &gt; 0</code> is False where <code>(5 or -2) &gt; 0</code> is True</p>

<p>Any clarification would be much appreciated. </p>
