主页
Python
Python - 更新元组
demo_tuple_remove
运行 ❯
×
更改方向
保存代码
更改主题
thistuple = ("apple", "banana", "cherry") y = list(thistuple) y.remove("apple") thistuple = tuple(y) print(thistuple)
('banana', 'cherry')