Remove Element
Table of Contents
List Manipulations - Remove Element
The removeElement() list syntax removes the first occurrence of the specified element, from a given list. This function will be just ignored if the specified element is not present in the list.
Syntax
<list>.removeElement(<value>);
where,
<list> refers to the list name from where the element needs to be removed.
<value> refers to the element to be removed from the list.
Example
In the following code, the element "Hockey" is removed from the sport_list. If the specified element does not exist in the list, it will be silently ignored without any error.
sports_list.removeElement("Hockey");
