title: Python things which are neither True nor False
body: <p>I just found this :</p>
  
  <pre><code>a = (None,)
  print (a is True)
  print (a is False)
  print (a == True)
  print (a == False)
  print (a == None)
  print (a is None)
  if a : print "hello"
  if not a : print "goodbye"
  </code></pre>
  
  <p>which produces :</p>
  
  <pre><code>False
  False
  False
  False
  False
  False
  hello
  </code></pre>
  
  <p>So a neither is, nor equals True nor False, but acts as True in an if statement. </p>
  
  <p>Why?</p>
  
  <p>Update : </p>
  
  <p>actually, I've just realized that this isn't as obscure as I thought. I get the same result for a=2, as well (though not for a=0 or a=1, which are considered equal to False and True respectively)</p>