Function Details: remove_(list)

Description


Remove the first occurrence of a value in the list.


Extended Description


The remove() method removes the first occurrence of the specified element from the list. If the element is not present in the list, it raises a ValueError. This method directly modifies the list and does not return any value.


Function Signature



Module: list

Class: list

Parameters



Parameter List


  • element: Any

Return


This method doesn't return a value. It modifies the list in-place.


Return Type


None

Output

Explanation

This example demonstrates the basic usage of remove(). The first occurrence of 2 is removed from the list.