1. del删除
2. pop()方法
pop()删除并返回指定元素,如果未指定则默认操作最后一个元素
3. remove()方法
删除首次出现的指定元素,若不存在则抛出异常
1 >>> a = [10,20,30] 2 >>> a 3 [10, 20, 30] 4 >>> del a[1] 5 >>> a 6 [10, 30] 7 >>> a = [10,20,30,40,50] 8 >>> a 9 [10, 20, 30, 40, 50] 10 >>> a.pop() 11 50 12 >>> a 13 [10, 20, 30, 40] 14 >>> a.pop(2) 15 30 16 >>> a 17 [10, 20, 40] 18 >>> a=[10,20,30,40,50] 19 >>> a 20 [10, 20, 30, 40, 50] 21 >>> a.remove(20) 22 >>> a 23 [10, 30, 40, 50]