A short Python interview question often tests whether you can explain a surprising result and then repair the contract. Shared inner lists, late-bound loop variables and consumed iterators all fit in a few lines, but their effects can reach a much larger service.
This easy set asks for runnable functions on original inputs. State the ownership rule before implementing the fix. A deep copy changes nested ownership, a captured default preserves a loop value, and an iterator resumes from its current position. Frozen value objects need equality and hashing that agree. The checks accept any implementation with the required behavior. They don't award credit for repeating a definition without handling the supplied edge case.