Planning a Python Course for Beginners
Marko Rauhamaa
marko at pacujo.net
Wed Aug 9 09:25:17 EDT 2017
ram at zedat.fu-berlin.de (Stefan Ram):
> Steve D'Aprano <steve+python at pearwood.info> writes:
>>There's a word for frozen list: "tuple".
>
> Yes, but one should not forget that a tuple
> can contain mutable entries (such as lists).
Not when used as keys:
>>> hash(([], []))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'
Marko
More information about the Python-list
mailing list