Removing All Elements from a Set in Python
You can remove all elements from a set using the clear method. You don't need to pass anything to its parameter.
Let us have a set:
pythonst = {'a', 'b', 'c'}
Let's clear it of all elements:
pythonst.clear()
print(st) # set()
Задание 1
Given a set:
pythonst = {1, 2, 3, 4, 5}
Clean it up.
Задание 2
Make an empty set and then add three elements to it.