replace

The replace() function replaces elements in a list, thereby creating a new list. The list elements in the specified range are deleted and those that are specified by the string arguments are inserted in their place. If replacement arguments are not supplied, then the appropriate elements are deleted without being replaced.

result = replace (list1, index1, index2 [,string1…]);
list1 Required. The list from which list elements are removed, and optionally, replaced by new elements
index1 Required. The first element in the range of elements to delete or replace.

index2

Required. The last element in the range of elements to delete or replace.
string1… Optional. The character string(s) that will replace the list elements that are being deleted.
result Contains the new list that is created by deleting or replacing elements from the original list.
list1 = {"Adm1", "Adm2", "Adm3", "Adm4"};
result = replace (list1, 2, 3, "SysAdm1", "SysAdm2");

In this example, result contains the following list:

{"Adm1", "Adm2", "SysAdm1", "SysAdm2"}

For more information, please see the following:

For more information, please see the following: