What this Python language-knowledge question tests
This is a medium-difficulty Python question that asks you to read and predict the output of a code snippet. It's the kind of question used to verify that a candidate has solid, practical knowledge of Python semantics rather than just theoretical understanding.
Questions like this often hinge on operator precedence, evaluation order, scoping rules, or the behaviour of built-in functions and data structures. The goal is to see whether you can trace through code mentally without running it—a skill that matters when debugging or reviewing code in a fast-paced environment.
- Operator precedence and associativity
- Order of evaluation (left-to-right vs. special cases)
- Built-in function behaviour and type coercion
- Python's scoping and name-binding rules