[Tutor] Boolean question
Donald Bedsole
drbedsole at gmail.com
Wed Mar 16 06:22:32 CET 2011
Hi folks,
I'm working on Boolean Operators right now, and I'm getting it for the
most part. But, could someone make sure I'm understanding this one
expression correctly?
not (False and True)
Python evaluates it as "True"
Is it because:
1)You evaluate what's in the parentheses first. A thing can not be
false and true at the same time, so the answer is false.
2)However, the "not" outside the parentheses flips the meaning of what
is inside the parentheses, so false becomes "True." ?
More information about the Tutor
mailing list