---
title: Operators and Operands in Python
source: https://app.sythra.ai/learn/python/operators-operands
topic: Python
updated: 2026-08-12
publisher: Sythra (https://app.sythra.ai)
---

# Operators and Operands in Python

In Python, operators are symbols (and some keywords) that perform computations; operands are the values they act on. Families include arithmetic, comparison, logical, assignment, membership, and identity.

_Source: [https://app.sythra.ai/learn/python/operators-operands](https://app.sythra.ai/learn/python/operators-operands) — free to read on Sythra._

## Key points

- Operator = action; operand = value being acted on
- / is true division (float); // is floor division; % is remainder
- == compares values; = assigns; is checks identity
- and / or / not combine conditions (see the logical operators leaf)
- += and friends update a variable in place
- in / not in test membership in sequences

Want to understand **operators and operands in Python**? Operators are the symbols that make values interact — add, compare, assign, check membership. The values they act on are the **operands**.

Until values sit alone, little happens. Programming begins when values combine. This page is the map of Python’s operator families: arithmetic, comparison, logical, assignment, membership, identity — plus a brief nod to bitwise. For a deeper treatment of `and` / `or` / `not`, see [Logical Operators in Python](/learn/python/logical-operators).

## What you will learn

By the end you can:

- Define **operator** vs **operand**
- Use arithmetic operators including `/`, `//`, `%`, and `**`
- Compare values with `==`, `!=`, `<`, `>`, `<=`, `>=`
- Combine conditions with `and`, `or`, `not` (overview)
- Update names with compound assignment (`+=`, `-=`, …)
- Check membership (`in`) and identity (`is`) — and know they differ from `==`

> This is an **overview** of operator families, not a deep dive into short-circuiting, truthiness, or bitwise math. Bitwise operators are named only; logical operators get a full leaf of their own.

## Operators and operands — the action and the actors

Operators are special symbols (and a few keywords) that tell Python to **perform a computation**. Think of them as verbs. If values are nouns, operators are the actions that connect them. The values being acted on are called **operands**.

```python
20 + 30
```

- `+` is the **operator**
- `20` and `30` are the **operands**

Not every operator is about math. Some compare. Some assign. Some check logic, membership, or identity. Below is each family.

## Arithmetic operators

These perform numerical calculations.

| Operator | Meaning | Example | Result |
| --- | --- | --- | --- |
| + | Addition | 10 + 5 | 15 |
| - | Subtraction | 10 - 5 | 5 |
| * | Multiplication | 10 * 5 | 50 |
| / | True division | 10 / 4 | 2.5 |
| // | Floor division | 10 // 4 | 2 |
| % | Modulo (remainder) | 10 % 4 | 2 |
| ** | Exponentiation | 2 ** 3 | 8 |

### True division vs floor division

In Python 3, `/` always returns a float — even when both operands are ints:

```python
print(10 / 4)   # 2.5
print(10 // 4)  # 2
```

`//` is floor division: it discards the fractional part toward negative infinity. For positive numbers that looks like “cut off the decimal” — it does not round to nearest.

### Modulo (%)

Modulo gives the **remainder** after division:

```python
print(10 % 4)  # 2  because 10 = (4 * 2) + 2
print(7 % 2)   # 1  → odd
```

Common uses: even/odd checks, cyclic counters, wrapping indices.

## Comparison operators

These compare values and return `True` or `False` — boolean results you will later use in `if` statements.

| Operator | Meaning | Example |
| --- | --- | --- |
| == | Equal to | 5 == 5 → True |
| != | Not equal | 5 != 3 → True |
| > | Greater than | 10 > 5 → True |
| < | Less than | 3 < 8 → True |
| >= | Greater or equal | 5 >= 5 → True |
| <= | Less or equal | 4 <= 10 → True |

> **Easy trap:** 

## Logical operators (overview)

Used to combine or invert conditions:

```python
print(True and False)  # False — both must be True
print(True or False)   # True  — at least one True
print(not True)        # False — reverses the result
```

That is enough for this map. Short-circuit evaluation, truthiness, and `and` vs `&` live on the dedicated page: [Logical Operators in Python](/learn/python/logical-operators).

## Assignment operators

Basic assignment stores a value under a name (see [Variables in Python](/learn/python/variables)):

```python
x = 5
```

Compound assignment updates a variable in place:

```python
x = 5
x += 3   # same as x = x + 3

x -= 2
x *= 4
x /= 2
x //= 3
x %= 2
x **= 2
```

## Membership operators

Check whether a value exists inside a sequence (list, string, and later other containers):

```python
print(3 in [1, 2, 3])       # True
print(5 not in [1, 2, 3])   # True
print("a" in "cat")         # True
```

## Identity operators

These check whether two names refer to the **same object in memory** — not merely equal values:

```python
a = [1, 2]
b = a
print(a is b)      # True  — same object
print(a is not b)  # False
```

> **== vs is:** 

## Bitwise operators (brief mention)

These work at the binary level: `&`, `|`, `^`, `~`, `<<`, `>>`. They show up in low-level work and some optimizations. You do not need them to start writing everyday Python — know they exist, then move on.

## Big-picture summary

| Category | Purpose |
| --- | --- |
| Arithmetic | Mathematical operations |
| Comparison | Returns True / False |
| Logical | Combines conditions |
| Assignment | Assigns and updates values |
| Membership | Checks presence in a sequence |
| Identity | Checks memory identity |
| Bitwise | Operates at the binary level |

Operators are not just symbols. They decide how values combine, how logic flows, and how programs behave. Once they click, you start thinking in **expressions** — not only in isolated statements.

## Common mistakes

- Using `=` when you meant `==`
- Expecting `/` to return an int (it returns a float in Python 3)
- Confusing `//` with rounding
- Treating `is` like `==`
- Using bitwise `&` / `|` when you meant logical `and` / `or`

> **Practice with Sythra:**  [Practice with AI tutor](https://app.sythra.ai/pricing)

## FAQ

### What are operators and operands in Python?

Operators are symbols or keywords that perform a computation. Operands are the values those operators act on. In 20 + 30, + is the operator and 20 and 30 are the operands.

### What is the difference between / and // in Python?

In Python 3, / is true division and always returns a float (10 / 4 is 2.5). // is floor division and discards the fractional part toward negative infinity (10 // 4 is 2).

### What does the % operator do in Python?

The % operator returns the remainder after division. For example, 10 % 4 is 2 because 10 = (4 × 2) + 2. It is often used for even/odd checks and cyclic counters.

### What is the difference between == and = in Python?

== checks whether two values are equal and returns True or False. = assigns a value to a name. They are not interchangeable.

### What is the difference between == and is in Python?

== compares values for equality. is checks whether two names refer to the same object in memory. Equal values are not always the same object.

### What are membership operators in Python?

Membership operators are in and not in. They test whether a value appears in a sequence such as a list or string — for example, 3 in [1, 2, 3] is True.

## Related

- [Logical Operators in Python](https://app.sythra.ai/learn/python/logical-operators) — Deep dive on and, or, not — short-circuit and truthiness.
- [Variables in Python](https://app.sythra.ai/learn/python/variables) — Names and assignment — where compound operators write back.
- [Types, Values, and Errors in Python](https://app.sythra.ai/learn/python/types-values-errors) — What values are before operators combine them.
- [Comments in Python](https://app.sythra.ai/learn/python/comments) — Annotate tricky expressions with useful # notes.
- [Statements vs Expressions in Python](https://app.sythra.ai/learn/python/statements-vs-expressions) — REPL vs script — expressions produce values, statements act.
- [Order of Operations in Python](https://app.sythra.ai/learn/python/order-of-operations) — PEMDAS, precedence, parentheses, and left-to-right ties.
- [Data Types in Python](https://app.sythra.ai/learn/python/data-types) — int, float, str, bool, list, tuple, dict, set — the full map.
- [Strings in Python](https://app.sythra.ai/learn/python/strings-in-python) — Indexing, slicing, immutability, and string methods.
- [Lists in Python](https://app.sythra.ai/learn/python/lists-in-python) — Mutability, list methods, map/filter/reduce, and the aliasing trap.
- [Python course hub](https://app.sythra.ai/learn/python) — All free Python explainers and the path into Agentic practice.
- [Comparison Operators in Python](https://app.sythra.ai/learn/python/comparison-operators-python) — ==, !=, <, >, and combining conditions with and/or/not.

---

Written by Sythra — Learn machine learning by building. Practice this topic with Sythra's AI tutor: https://app.sythra.ai/pricing
