Python Boolean Operators
&&) for AND, the two vertical bars (
||) for OR, and the exclamation point (
!) for NOT.
Python actually uses the keywords written in English:
not. You would simply use those to separate your two expressions for
or, or put
not in front of another expression to do its negation.
Become a Member to join the conversation.