當我鍵入以下代碼時。我只是嘗試刪除列表中的重複項目。這個列表中可能有10K對。TypeError:不可用類型:'list',刪除列表中的重複項
>>> t = [['a','1'],['a','1'],['a','2']...]
>>> t = list(set(t))
Traceback (most recent call last):
File "<pyshell#19>", line 1, in <module>
t = list(set(t))
TypeError: unhashable type: 'list'
>>>
的獨特元素順便說一句,我使用Python2.7 – xlk3099 2013-03-02 02:26:52