This what I got while fiddling with the python interpreter
[mohamed@localhost ~]$ python
Python 2.7.5 (default, Apr 10 2015, 08:09:14)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 'a' in 'abc'
True
>>> 'a' in 'abc' == True
False
>>> 'a' in 'abc' == False
False
>>> ('a' in 'abc') == True
True
>>> ('a' in 'abc') == False
False
>>> ('a' in 'abc' == True) or ('a' in 'abc' == False)
False
>>> (('a' in 'abc') == True) or (('a' in 'abc') == False)
True
My question is why using parenthesis gives me the intended, and more logically sound, output?