Top index Wirbel home

::clear

set(T).clear() - remove all elements from a set
list(X).clear() - remove all elements from a list
dict(K.clear(V)) - remove all elements from a dictionary

set(T).clear() emptys the set by removing all its elements

list(X).clear() changes alist by removing all elements. This is not the same as creating a new empty list, since there might exist references to the list.

dict(K.clear(V)) clears the dictionary by removing all its elements. Note, that the following two statements do not the same

Examples

See also

cleared