📜  pythonremove all instances from a list - Python代码示例
📅  最后修改于: 2022-03-11 14:46:22.031000             🧑  作者: Mango
代码示例1
l = [0, 1, 0, 0, 1, 0, 1, 1]
val = 0
try:
while True:
l.remove(val)
except ValueError:
pass