The set data type represents a collection of unordered, unique elements. It contains various methods for manipulating and extracting information about a set. Sets are mutable, meaning that operations that actually modify the sets are possible.

The clear() method is used to remove all elements from  a set, effectively making it an empty set.


The method does not take any arguments, it simply removes all the elements from the set and returns None

myset = {1, 2, 3, 4}

#remove all elements
#The set is now empty