clear() - Removes all the elements from the set

Removes all the items from the set, returning an empty set.

Example

Python
components = {'memory', 'processor', 'SSD'}
components.clear()
print(components)

Output

set()