Remove Index

Tags:  

List Manipulations - Remove Index

The Remove Index list syntax removes the element at the specified position from this list.

Syntax

<list>.remove(<indexexpression>);

where,

<list> refers to the list name
<value> - the index number of the element to be removed.

Example

In the given sample code, the value of the element at the given index is removed from the sports_list.


<sports_list>.remove(0);

 

=2;
<sports_list>.remove(i);

0 Comments  Show recent to old
Post a comment


 RSS of this page