W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_ref_set_update.py:
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} x.update(y) print(x)
x
x
=
{
"apple"
,
"banana"
,
"cherry"
}
y
=
{
"google"
,
"microsoft"
,
"apple"
}
x
.
update
(
y
)
print
(
x
)