list vs tuple for a dict key- why aren't both hashable?

Tycho Andersen tycho at
Sun Nov 8 19:33:12 CET 2009

On Sun, 8 Nov 2009, Wells wrote:

> I'm not quite understanding why a tuple is hashable but a list is not.
> Any pointers? Thanks!

The keys of a dict have to be immutable. Lists are mutable, tuples are


More information about the Python-list mailing list