Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
union
union
Return a new set with elements from the set and all others.
Python 3.13
set
.
union
(
*
others
)
*others
Other sets.
Examples
Python 3.13
>>
>
{
1
,
2
}
.
union
(
{
3
,
4
}
)
{
1
,
2
,
3
,
4
}