Remove function

Removes items from a list


Description

The Remove function removes a single item or range from a list.


Remove a single element

To remove a single element, pass the list and index of the element as parameters


Remove an area

To remove an area, enter the index and the length of the area to be removed.


Remove area at the end of the list

To remove an area at the end of a list, enter the value (-1) and the length of the area as an index.


Syntax

Remove (list, index)

Remove (list, index, length)

Examples

a = [1,2,3,4,5,6,7,8]

Remove(a,4)= 1 2 3 5 6 7 8

Remove(a,3,3)= 1 2 6 7 8

Remove(a,-1,3)= 1 2 3 4 5