Method Name:
remove
Method Signature:
remove(element_in)
Method Overview:
The remove() method removes the first element that matches the value specified by the parameter element_in.
Parameters:
element_in: The element to be removed from the python list
Exceptions:
ValueError: If the value is not in the list a ValueError is raised stating that the element specified is not in the list.
Example:
# Example Python program that removes the first occurence of # List of birds # Remove the birds which do not fly |
Output:
Birds that can fly:['Gull', 'Parrot', 'Peacock', 'Robin', 'Penguin'] |