title: In python 3 logical operator giving me an opposite result
body: <p>I was working in Python 3, I created one If-else statement with the logical operator "&amp;". the result that got was inverse of what actually should have appeared. As:
  a=20
  b=30</p>
  
  <pre><code>if a==b &amp; a==20:
      print("a is equal to b")
  else:
      print ("a is not equal to b")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vB2Fj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vB2Fj.png" alt="enter image description here"></a></p>
  
  <p>This condition should have printed out the else condition since the first statement "a==b" is a false statement and the second statement "a==20" is true. Mathematical logic says when a statement in "&amp;" condition is false result would be false. 
  The strange thing happened when I replaced the condition "a==b" with "b==a", the result was correct. </p>
  
  <p><a href="https://i.stack.imgur.com/KaIu3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KaIu3.png" alt="enter image description here"></a></p>