a = [1, 2, 3]
for i in a[:]:
a.remove(i)
print(a)
python 循环删除列表中元素
最新推荐文章于 2024-04-29 01:46:25 发布
a = [1, 2, 3]
for i in a[:]:
a.remove(i)
print(a)