Why can a list not be used as a key in a Python dictionary?
Explanation
Dictionary keys must be hashable, while a list can change its contents and is unhashable. Allowing arbitrary mutable keys would undermine stable lookup, and a dictionary cannot hold simultaneous duplicate equal keys.