PYTHON - Unhashable List PYTHON - Unhashable List tkinter tkinter

PYTHON - Unhashable List


You can't hash lists, only immutable things. Although you could define a __hash__ method for some extension of the list object, the reason behind this logic is that if you were to look something up in a dictionary, you would expect the entries' names not to change. Similarly, in python, the keys must be immutable. As another answer said, use a tuple instead.