title: Why are this operands returning False?
body: <p>I have a counter-intuitive issue while writing my script in Python. </p>
  
  <pre><code>&gt;&gt;&gt; def foo():
  ...     return False
  ... 
  &gt;&gt;&gt; foo()
  False
  &gt;&gt;&gt; foo()==False
  True
  &gt;&gt;&gt; i=1
  &gt;&gt;&gt; i!=0
  True
  &gt;&gt;&gt; foo()==False &amp; i!=0
  False
  &gt;&gt;&gt; (foo()==False) &amp; i!=0
  True
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>As you can see <strong>foo()==False</strong> returns <strong>True</strong> as <strong>i!=0</strong> does, so intuitively I would expect <strong>True &amp; True</strong> to return <strong>True</strong>, however when I run <strong>foo()==False &amp; i!=0</strong> I receive False and when I run <strong>(foo()==False) &amp; i!=0</strong> I get True as was initially expected. What is going on here? </p>