<, >, =, ==, >=, <=, !=, *, +, -, **, +=, -=, /=, *=, in, and, not, is.
()can override priority.
=is the assignment operator.
==is the equality operator, it returns true if both operands have the same value.
Note: It is a classic mistake to use
==when you really want to use
=or vice versa.
27/7divides 27 by 7 and returns a floating point result
27//7divides 27 by 7 and returns an integer result.
**is the operator for calculating power.
a = 3. If you want to add
4to the variable
a = a + 4. But this tends to be verbose.
a += 4: Another way to do exactly the same calculation.
+=is a shortcut operator. There are other shortcut operators like:
+=, -=, /=, *=. No spaces are allowed between -=, +=.
--, but they are not available in Python.
inoperator tests if the element on the left hand side is present in the right hand side sequence (list, tuple, set).