Search notes:
Python: hash
hash(obj)
is only defined on
hashable types
such as
tuples
.
Misc
An
object's
hash value is used to store the object in a
dict
.
Because a
list
is not hashable, a list cannot be used as a key in a
dict
.
See also
Python: Built in functions
Index