Skip to main content

removeAll

Clears a list or map.

removeAll(targetList)
# Or
removeAll(targetMap)

Parameters#

  • targetList: The target list
  • targetMap: The target map

Returns#

  • No value

Example#

# Clear listfruits = ['apple', 'banana', 'orange']removeAll(fruits)print(fruits) # prints []
# Clear mapproduct = {name: 'nest'}removeAll(product)print(product) # prints {}