dict not ok
d = {'a': 34, 'b': 435}rm_k = []for k in d.keys(): if k == 'a': d.pop(k)
list ok
l = ['wer', 'a', 'ccc']for i in l: if i == 'a': l.remove(i)
翻译
搜索
复制