I try some samples in python console. And was confused for the following:
>>> (1 and None)
>>> (1 and None) == None
True
>>> (1 or None) == None
False
>>> (1 and 2) == 2
True
>>> (2 and 1) == 2
False
>>> (2 and 1) == 1
True
I was confused for what is the why (1 and None) does not return any thing is line 1? It should be None? And why (2 and 1) equals to 1 but not 2. Sorry for new with Python.