September 2026
1051 pages
35h 4m
English
Table A.2 specifies the precedence of all syntax elements that can occur in a valid Python expression. This list includes the operator precedence already defined in Chapter 10, Section 10.2.
|
Operator |
Usual Meaning |
|---|---|
|
(...), [...], {...} [...], {...} |
Parentheses in arithmetic expressions Literals for tuples, lists, sets and dictionaries Comprehensions |
|
x[...] x. x(...) |
Access to elements of a sequence Access to attributes and methods Function and method calls |
|
await x |
Await expression |
|
x ** y |
yth power of x |
|
+x -x ~x |
Positive sign Negative sign Bitwise complement of x |
|
x * y x / y x % y x // y x @ y |
Product of x and y Quotient of x and y Remainder for integer division of x by y |
Read now
Unlock full access