What this Python comparison operator question tests
This is an easy practice question that probes your working knowledge of how Python evaluates comparison expressions and operator precedence. It's the kind of foundational check that interviewers use early in a conversation to establish baseline fluency with the language.
To answer correctly, you need to understand Python's comparison chaining rules, how operators associate, and what values or types are produced by the expression. The question rewards careful reading of the code and precise mental execution—there are no tricks, but misreading the syntax or misremembering operator behaviour will lead you astray.
- Operator precedence in Python
- Comparison chaining and short-circuit evaluation
- Type coercion and truthiness