Precedence of operators in Python 3

Precedence of operators in Python 3

Precedence specifies the priority of operators in an expression.

It specifies the order in which operators will be evaluated left to right in an expression. Operators precedence table in Python :

S. No Operators
1 **
2 ~ ,+, – (Unary operators)
3 *, /, % , //
4 +, –
5 >> ,<<
6 &
7 ^, |
8 <=, <, >, >=
9 ==, !=
10 =, %=, /=, //=, -=, +=, *=, **=
11 is, is not
12 in, not in
13 Not, or, and

Spread the love
Lesson tags: arithmetic operators in python, binary operators of python, bitwise operators of python, logical operators of python, membership operators of python, python operators, rellational operators of python, spcial operators of python, unary operators of python
Back to: Python Programming Tutorial
Spread the love