Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
set.remove
set.remove
Remove element elem from the set. Raises KeyError if elem is not contained in the set.
Python 3.13
1
set
.
remove
(
elem
)
Examples
Python 3.13
1
2
s
=
{
1
,
2
,
3
}
s
.
remove
(
3
)
{1, 2}