Python Function Reference

set.remove
Remove element elem from the set. Raises KeyError if elem is not contained in the set.
Python 3.13
set.remove(elem)
Examples
Python 3.13
s = {1, 2, 3}
s.remove(3)
{1, 2}