setAt
Sets a list
item at index.
setAt(targetList, index, item)
#
ParameterstargetList
:list
where item will be setindex
: An index within thetargetList
item
: A value of supported type
#
Returns- No value
#
Examplefruits = ['apple', 'banana', 'orange']setAt(fruits, 1, 'peach')print(fruits[1]) # prints, peach