Python List remove() Method

Python List remove() Method
  • The remove() method removes the first matching element (which is passed as an argument) from the list.


  • list.remove(element)


  • The remove() method takes a single element as an argument and removes it from the list.

  • If the element doesn't exist, it throws ValueError: list.remove(x): x not in list exception.

Return Value

  • The remove() doesn't return any value (returns None).