Skip to main content

addTo

Adds an item to a list.

addTo(targetList, item)

Parameters#

  • targetList: list where an item is added
  • item: A value of supported type

Returns#

  • No value

Example#

fruits = []addTo(fruits, 'mango')addTo(fruits, 'plum')addTo(fruits, 'grape')print(fruits) # prints [mango, plum, grape]