Home >>Python List Methods >Python List remove() Method

Python List remove() Method

Python List remove() Method

Python list remove() method is used to remove the first occurrence of the element with the specified value in the given input list.

Syntax:
list.remove(element)

Parameter Values

Parameter Description
element This is a required parameter. It defines the element you want to remove.
Here is an example of Python remove() method:

a = ['Abhi', 'Mike', 'Jerry']
a.remove("Mike")
print(a)

Output:
['Abhi', 'Jerry']
Example 2:

fruits = ['Apple', 'Banana', 'Orange']
fruits.remove("Banana")
print(fruits)

Output:
['Apple', 'Orange']

No Sidebar ads