Boolean Expressions
Gregory Ewing
greg.ewing at canterbury.ac.nz
Wed Sep 27 00:23:27 EDT 2017
Cai Gengyang wrote:
> So does that mean that the way 'and' works in Python is that both terms must
> be True (1) for the entire expression to be True ? Why is it defined that
> way, weird ?
It's not weird, it's the normal meaning of "and" in English.
Do I have purple hair? No.
Do I have three nostrils? No.
Do I have purple hair AND three nostrils? No.
If the answer to the third question were "yes" given
the first two, *that* would be weird.
--
Greg
More information about the Python-list
mailing list