print(False == False or True) | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответ
+ 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