Method signature:
clear()
Method Overview:
Removes all elements from the set, which makes the set an empty set.
Example:
# Example Python program that removes all the elements of a set # Create a set with five elements # Remove all the elememts # Print the set contents |
Output:
set() 0 |