x = [1, 2, 1, 2, 1, 2, 1]
for i in x:
if i == 1:
x.remove
关于Python列表元素的删除:for循环下的remove()
于 2020-09-26 16:53:49 首次发布
x = [1, 2, 1, 2, 1, 2, 1]
for i in x:
if i == 1:
x.remove