# Logical Operators

*noun*

say it: **“LOJ-ih-kul OP-uh-ray-terz”** **/ˈlɑdʒɪkəl ˈɑpəreɪtərz/**

The words and, or and not, which combine true-or-false checks into one: and needs both to be true, or needs at least one, and not flips the answer.

## What are **logical operators**?

**Logical operators** combine True/False checks: `and` needs both to be true, `or` needs at least one, and `not` flips True to False.

```python
has_ticket = True
is_vip = False
print(has_ticket and is_vip)  # False
print(has_ticket or is_vip)   # True
print(not is_vip)             # True
```

## In a sentence

- “With **logical operators**, one if can ask whether the order is paid or the customer has store credit.”
- “The ticket check uses **logical operators** to let in anyone who has a ticket and isn't on the banned list.”

Level: Novice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=1)

Updated: November 19, 2026

## In other subjects

- [Logical Operators in C#](https://www.ask-codey.com/glossary/logical-operators-c-sharp)
- [Logical Operators in Java](https://www.ask-codey.com/glossary/logical-operators-java)
- [Logical Operators in JavaScript](https://www.ask-codey.com/glossary/logical-operators-javascript)
- [Logical Operators in MongoDB](https://www.ask-codey.com/glossary/logical-operators-mongodb)
- [Logical Operators in PowerShell](https://www.ask-codey.com/glossary/logical-operators-powershell)

Source: https://www.ask-codey.com/glossary/logical-operators
