removeAll
Clears a list
or map
.
removeAll(targetList)
# Or
removeAll(targetMap)
#
ParameterstargetList
: The targetlist
targetMap
: The targetmap
#
Returns- No value
#
Example# Clear listfruits = ['apple', 'banana', 'orange']removeAll(fruits)print(fruits) # prints []
# Clear mapproduct = {name: 'nest'}removeAll(product)print(product) # prints {}