Mr. Editor-in-chief Mr. Editor-in-chief 1 min read 58 words 1852 views

Precedence of Logical Operators

Operator Precedence
! High
&& Medium
|| Low
**Here is an example in Python** ```python a, b, c = False, False, True print(not b or c) # True print(not (b or c)) # False print(a and b or c) # True print(a and (b or c)) # False ```
Copied to clipboard

Share this post

Related Posts