\n", " | Operator | \n", "Name | \n", "Example | \n", "Try it | \n", "
---|---|---|---|---|
0 | \n", "+ | \n", "Addition | \n", "x + y | \n", "Try it » | \n", "
1 | \n", "- | \n", "Subtraction | \n", "x - y | \n", "Try it » | \n", "
2 | \n", "* | \n", "Multiplication | \n", "x * y | \n", "Try it » | \n", "
3 | \n", "/ | \n", "Division | \n", "x / y | \n", "Try it » | \n", "
4 | \n", "% | \n", "Modulus | \n", "x % y | \n", "Try it » | \n", "
5 | \n", "** | \n", "Exponentiation | \n", "x ** y | \n", "Try it » | \n", "
6 | \n", "// | \n", "Floor division | \n", "x // y | \n", "Try it » | \n", "
\n", " | Operator | \n", "Example | \n", "Same As | \n", "Try it | \n", "
---|---|---|---|---|
0 | \n", "= | \n", "x = 5 | \n", "x = 5 | \n", "Try it » | \n", "
1 | \n", "+= | \n", "x += 3 | \n", "x = x + 3 | \n", "Try it » | \n", "
2 | \n", "-= | \n", "x -= 3 | \n", "x = x - 3 | \n", "Try it » | \n", "
3 | \n", "*= | \n", "x *= 3 | \n", "x = x * 3 | \n", "Try it » | \n", "
4 | \n", "/= | \n", "x /= 3 | \n", "x = x / 3 | \n", "Try it » | \n", "
5 | \n", "%= | \n", "x %= 3 | \n", "x = x % 3 | \n", "Try it » | \n", "
6 | \n", "//= | \n", "x //= 3 | \n", "x = x // 3 | \n", "Try it » | \n", "
7 | \n", "**= | \n", "x **= 3 | \n", "x = x ** 3 | \n", "Try it » | \n", "
8 | \n", "&= | \n", "x &= 3 | \n", "x = x & 3 | \n", "Try it » | \n", "
9 | \n", "|= | \n", "x |= 3 | \n", "x = x | 3 | \n", "Try it » | \n", "
10 | \n", "^= | \n", "x ^= 3 | \n", "x = x ^ 3 | \n", "Try it » | \n", "
11 | \n", ">>= | \n", "x >>= 3 | \n", "x = x >> 3 | \n", "Try it » | \n", "
12 | \n", "<<= | \n", "x <<= 3 | \n", "x = x << 3 | \n", "Try it » | \n", "
\n", " | Operator | \n", "Name | \n", "Example | \n", "Try it | \n", "
---|---|---|---|---|
0 | \n", "== | \n", "Equal | \n", "x == y | \n", "Try it » | \n", "
1 | \n", "!= | \n", "Not equal | \n", "x != y | \n", "Try it » | \n", "
2 | \n", "> | \n", "Greater than | \n", "x > y | \n", "Try it » | \n", "
3 | \n", "< | \n", "Less than | \n", "x < y | \n", "Try it » | \n", "
4 | \n", ">= | \n", "Greater than or equal to | \n", "x >= y | \n", "Try it » | \n", "
5 | \n", "<= | \n", "Less than or equal to | \n", "x <= y | \n", "Try it » | \n", "
\n", " | Operator | \n", "Description | \n", "Example | \n", "Try it | \n", "
---|---|---|---|---|
0 | \n", "and | \n", "Returns True if both statements are true | \n", "x < 5 and x < 10 | \n", "Try it » | \n", "
1 | \n", "or | \n", "Returns True if one of the statements is true | \n", "x < 5 or x < 4 | \n", "Try it » | \n", "
2 | \n", "not | \n", "Reverse the result, returns False if the resul... | \n", "not(x < 5 and x < 10) | \n", "Try it » | \n", "