Python supports the following types of operators:
- Arithmetic operators.
- Comparison operators
- Assignment operators
- Bitwise operators
- Logical operators
- Membership operators
- Identity operators
Arithmetic expressions comprise operands and operators:
Operator | Description |
| Exponent: Performs exponential (power) calculations on operands |
| Multiplication: Performs multiplication between operands |
| Division: Performs division between operands |
| Modulus: Performs modulus division between operands |
| Addition: Performs addition between operands |
| Subtraction: Performs subtraction between operands |
We have already discussed the precedence order of the operators.
Like any other language, Python also supports comparison operators. Comparison operators return True
or False
:
Operator | Description |
| Checks the equality |
| Returns |
| Returns |