Arithmetic operators in Python are symbols or keywords used to perform mathematical operations on variables or values. These operators work primarily with numbers but can also be applied to certain data types like strings, tuples, and lists.| Operator | Description | Example |
|---|---|---|
+ | Addition | 9 + 2 = 11 |
- | Subtraction | 9 - 2 = 7 |
* | Multiplication | 9 * 2 = 18 |
/ | Division | 9 / 2 = 4.5 |
// | Floor Division (Integer Div) | 9 // 2 = 4 |
% | Modulo (Remainder) | 9 % 2 = 1 |
** | Exponent (Power) | 9 ** 2 = 81 |
| Operator | Description |
|---|---|
** | Exponentiation |
*, /, //, % | Multiplication, Division, Floor Division, Modulo |
+, - | Addition, Subtraction |
**).a * b is evaluated first: 9 * 2 = 1818 / a is evaluated next: 18 / 9 = 2a + b is evaluated: 9 + 2 = 1111 - 2 = 9+) and multiplication (*) operators for strings, enabling string concatenation and repetition.- or /, cannot be applied to strings.+), subtraction (-), multiplication (*), division (/), floor division (//), modulo (%), and exponentiation (**).**) has the highest precedence among arithmetic operators.+ and * operators can be used with strings, tuples, and lists for concatenation and repetition.