Skip to content
Sharp

Core Collections · interview question

A bug appears around tuples. What is the strongest first debugging move?

Multiple choiceEasychapter-3-curatedpremiumcore-collectionstuples
python
location = ("Aisle-2", "Shelf-4")
aisle, shelf = location
print(aisle, shelf)
Choose one answer
Answer and explanation

Correct answer

D. Trace one concrete example, inspect the state transitions, and compare them to the intended rule before rewriting anything.

Why

That approach is reliable because it creates evidence. If the positions are hard to remember, the tuple is probably hiding a richer model that should be named.

Test yourself on Core Collections

A free test with instant, explained results. No account needed.

Start free test
All Core Collections questions →