python list删除元素 del remove

L=[5,4,3,2,1,'abc']

del 按照index删除比如:

del L[i]

del L[i:j]

remove按照内容删除

L.remove('abc')

L.remove(0)#会报错,因为没有为0的内容

原文地址:https://www.cnblogs.com/Dzhouqi/p/4106854.html