W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_ref_set_union_2.py:
x = {"a", "b", "c"} y = {"f", "d", "a"} z = {"c", "d", "e"} result = x.union(y, z) print(result)
x
x
=
{
"a"
,
"b"
,
"c"
}
y
=
{
"f"
,
"d"
,
"a"
}
z
=
{
"c"
,
"d"
,
"e"
}
result
=
x
.
union
(
y
,
z
)
print
(
result
)