1、拷贝删除
queue = ['a, 'b', 'c', 'a', 'b']
print(queue)
for item in queue[:]:
if item == 'a' or item == 'b':
queue.remove(item)
print(queue)
2、倒叙删除
queue = ['a, 'b', 'c', 'a', 'b']
print(queue)
for i in range(len(collect) - 1, -1, -1):
if collect[i] == 'a' or collect[i] == 'b':
del collect[i]
print(collect)