Definition
The remove() method removes the first occurrence of the element with the specified value.
Syntax
list.remove(item)
Parameters
Parameter | Description |
---|---|
item | Required. Any type (string, number, list etc.) The element you want to remove |
Examples:
cars = ['Nissan', 'Ford', 'Volkswagen']
cars.remove('Volkswagen')
print(cars)