THE WORLD'S LARGEST WEB DEVELOPER SITE

Python List remove() Method

❮ List Methods


Example

Remove the "banana" element of the fruit list:

fruits = ['apple', 'banana', 'cherry']

fruits.remove("banana")
Run example »

Definition and Usage

The remove() method removes the first occurrence of the element with the specified value.


Syntax

list.remove(elmnt)

Parameter Values

Parameter Description
elmnt Required. Any type (string, number, list etc.) The element you want to remove

❮ List Methods