Python Operator Precedence

The upper operators have higher precedence than the lower.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Grouping			()
Function call			f()
Slicing				[index:index]
Array subscription		[]
Bitwise NOT			~x
Unary plus/minus		+, -
Mul/Div/Mod			*, /, %
Add/Sub				+, -
Bitwise shift			<<, >>
Bitwise AND			&
Bitwise XOR			^
Bitwise OR			|
Relation			==, !=, >, >=, <, <=, is, is not, in, not in
				not
				and
				or
				lambda

refer to:
https://discuss.codechef.com/t/operator-precedence-table/14545