H2K Infosys Forum

Why does True or Fa...
 
Notifications
Clear all

Why does True or False and False return True?

 
Member Moderator

Because and has higher precedence than or.
So Python evaluates False and False first → False.
Then it checks True or FalseTrue.

Understanding operator precedence is very important when learning Python or preparing for Python Certification Online, because these concepts often appear in coding tests and real-world logic building.


Quote
Topic starter Posted : 04/12/2025 5:33 am
Share: