print(False == False or True) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

print(False == False or True)

Please tell me why is this true.?

28th Apr 2020, 11:48 AM
Laraib Rayeen
Laraib Rayeen - avatar
1 Answer
+ 1
It's because the operators have a specified order of evaluation. It's called the order of precedence. So, in Python, this will be true because the comparison operator has higher precedence and then boolean OR operator will evaluate the answer.
28th Apr 2020, 11:59 AM
rafalzacher1