考慮到與列表字典作爲值和一個單獨的列表:更新列表
myDict = {0: [0, 1, 2], 1: [], 2: [20, 25, 26, 28, 31, 34], 3: [], 4: [0, 1, 2, 3, 4, 7, 10], 5: [], 6: [10, 20, 24]}
myList = [1, 34, 10]
如何刪除從列表中值myDict,如果他們匹配myList中值是多少?
所以對於例如字典我期待在年底這樣一個字典:
myDict = {0: [0, 2], 1: [], 2: [20, 25, 26, 28, 31], 3: [], 4: [0, 2, 3, 4, 7], 5: [], 6: [20, 24]}