AI engineering glossary · Python core
What is logical operator?
Logical operator (also called boolean operator): One of the keywords and, or and not, which combine or invert boolean conditions. and is true only if both sides are true, or is true if at least one side is, and not flips the value. They are used to build compound conditions.
Logical operator: an example
age >= 18 and has_id is True only when both hold. not is_empty flips a True into False.
Related terms
More Python core terms
Where you learn it
Logical operator is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.