list.insert

Syntax

lret := list.insert(l,i,a)

Inserts the single parameter a before index i in list l and returns the new list. If i is less than 1 the value will be prepended. If i is greater than the size of list l then the value will be appended.

If you wish to insert multiple values at once from a list or other iterable type, see list.insert.list.

Returns:

lret - the list created by inserting the value a before index :

Arguments:

l - the starting list to be inserted into i - the index before which the value will be inserted. a - the value that will be inserted.