What problem does a Python dictionary model better than a list?
Give your answer before opening the model response. State the invariant or execution state that drives your choice.
Reveal model answer
A dictionary models key → value lookup when a stable identity such as SKU, user ID, or composite key should retrieve associated data. A list models sequence/position and may allow duplicates.
What the interviewer is testing
Name the operation first. Interviewers want to hear why the structure fits the requirement, not “dict is faster.”