0

# What is order of operator precedence?

I mean like for example _and_ has higher operator precedence. I hope you understand my doubt. Please help me!đđ

4 Answers

+ 8

https://docs.python.org/3/reference/expressions.html#operator-precedence .

+ 3

Piyush Puria If you're referring to operations including conditional and logic operations.
First are the arithmetic operations and parentheses (ascending).
( ) , ** , // , / , > , % , + , -
Then logical operators (ascending)
( ) , == , != , and , or
Please correct me if I'm wrong. Thanks.

+ 1

Piyush Puria Read this and associated comments :
https://www.sololearn.com/learn/Ruby/2763/?ref=app

0

I know that bodmas but I want to know the bodmas of python,I mean, operator precedence of different operands in python.