3
Possible Duplicate:
Python: removing duplicates from a list of lists從列表中刪除重複項?
從列表中刪除重複項的最佳方法是什麼?
我試圖用這樣設置:
L1 = [['fox', 'dog'],['bat', 'rat'],['fox', 'dog']]
L1 = list(set(L1))
不幸的是,我得到一個類型錯誤:unhashable類型: '名單'。
在我的列表中有兩個['狐狸','狗')出現。我想L1除去重複,看起來像這樣:
L1 = [「狐狸」,「狗」],[「蝙蝠」,「鼠」]