What this Python language-knowledge question tests
This is a medium-difficulty Python question that probes your understanding of how the language handles default arguments and mutable state. It's the kind of gotcha that separates candidates who have read the Python docs carefully from those who rely on intuition alone.
To answer correctly, you need to trace through the execution model: when defaults are bound, how mutable objects behave across multiple function calls, and what the interpreter actually prints to stdout. The question rewards precision—a single character or line break out of place is wrong.
- Default argument evaluation (when and where it happens)
- Mutable vs. immutable objects as defaults
- Object identity and reference semantics
- Function call side effects