Home >>Python List Methods >Python List pop() Method
Python list pop() method is used to remove the element at the specified position in the given input list.
Syntax:list.pop(pos)
Parameter | Description |
---|---|
pos | This is an optional parameter. It defines a number specifying the position of the element you want to remove. |
a = ['Abhi', 'Mike', 'Jerry']
a.pop(1)
print(a)
a = ['Abhi', 'Mike', 'Jerry']
a.pop()
print(a)