如果List中的key是帶有list的tuple,為何不可以呢?tuple也是不可變的啊
代碼:
L={(2,3,[12,5,6]):True,
?? 2:Lis,
?? (2,5,9):mon}
輸出結果是:
Traceback (most recent call last):
? File "<pyshell#13>", line 1, in <module>
??? L={(2,3,[12,5,6]):True,
TypeError: unhashable type: 'list'
為何會報錯呢?
2016-08-25
不知道啊