Operators
Each of the following operators can be used in the form a = b operator c. Each can
also be used as an assignment operator in the form a operator= b (e.g. a += 1, x **= 2).
| + | arithmetic addition | |
| - | negation or arithmetic subtraction | |
| * | arithmetic multiplication | |
| / | arithmetic division | |
| ** | arithmetic power | |
| % | arithmetic modulo | |
| & | bit-wise and | |
| | | bit-wise or | |
| ~ | bit-wise not | |
| ^ | bit-wise xor (exclusive or) | |
| << | bit-wise left shift | |
| >> | bit-wise right shift |
Each of the following operators returns 0 (false) or 1 (true) and can be used in conditional expressions.
| > | greater than | |
| < | less than | |
| >= | greater than or equal to | |
| <= | less than or equal to | |
| != | not equal to | |
| == | equal to |