unhashable type:'list'什么意思
unhashable type:'list'什么意思
Python中
[解决办法]
Lists cannot be dictionary keys – more on this later:
>>> mydict = {[1,2] : "wont_work"}
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'list'
list的内容是可变的,不可hash,因此不能作为dict的keys.