In [9]: i=0
...: while(i<len(lst)):
...: if lst[i]==2:
...: del lst[i]
...: else:
...: i+=1
...: print(lst)
...:
[1, 3, 4, 5]
还是老老实实循环吧