Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
set.pop
set.pop
Remove and return an arbitrary element from the set (as sets are unordered). Raises KeyError if the set is empty.
Python 3.13
set
.
pop
(
)
Examples
Python 3.13
>>
>
s
=
{
1
,
2
,
3
}
>>
>
s
.
pop
(
)
3