📜  python list pop - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:17.758000             🧑  作者: Mango

代码示例6
# removes last element of list unless parameter is given
l1 = [1,2,3,4,5]
print(l1.pop()) # returns [1, 2, 3, 4]
print(l1.pop(2)) # returns [1, 2, 4, 5] removes element at given index