📅  最后修改于: 2022-03-11 14:46:08.122000             🧑  作者: Mango
elements = ['el1', 'el2', 'el3', 'el4', 'el5']
for el in elements[:]: #[:] shallow-copies the list
if el.lower() in ['el2', 'el3', 'el4']:
elements.remove(el)
// elements -> ['el1', 'el5']