title: Python's in (__contains__) operator returns a bool whose value is neither True nor False
body: <p>As expected, 1 is not contained by the empty tuple</p>
  
  <pre><code>&gt;&gt;&gt; 1 in ()
  False
  </code></pre>
  
  <p>but the <code>False</code> value returned is not equal to <code>False</code></p>
  
  <pre><code>&gt;&gt;&gt; 1 in () == False
  False
  </code></pre>
  
  <p>Looking at it another way, the <code>in</code> operator returns a <code>bool</code> which is neither <code>True</code> nor <code>False</code>:</p>
  
  <pre><code>&gt;&gt;&gt; type(1 in ())
  &lt;type 'bool'&gt;
  &gt;&gt;&gt; 1 in () == True, 1 in () == False
  (False, False)
  </code></pre>
  
  <p>However, normal behaviour resumes if the original expression is parenthesized</p>
  
  <pre><code>&gt;&gt;&gt; (1 in ()) == False
  True
  </code></pre>
  
  <p>or its value is stored in a variable</p>
  
  <pre><code>&gt;&gt;&gt; value = 1 in ()
  &gt;&gt;&gt; value == False
  True
  </code></pre>
  
  <p>This behaviour is observed in both Python 2 and Python 3.</p>
  
  <p>Can you explain what is going on?</p>