Operators
Level: Beginner
Operators are similar to functions in Python but ever so slightly different.
Operators fall into a few different basic groups of operators.
Arithmetic:
+. The + operator is pretty simple to understand if you know math.
-. The - operator subtracts.
*. Multiplication.
**. Exponent.
/. Divide.
%. Percentage.
Assignment:
<. Less than.
>. Greater than.
==. Is equal.
=. Equal.
!=. Not equal to.
<=. Less than or equal too.
>=. Greater than or equal too.
Identity:
is. Is.
is not. Is not.
in. Inside of list
These operators can be used in many different sectors of programming and are very important to learn.
If you look at the 2nd to last if statement in the code above you will notice that you can mix and match operators to make one long statement.
Last updated
Was this helpful?