代码示例:(标识:python_tuple_change)
python_tuple_change.py
x = ("apple", "banana", "cherry")
y = list(x)
y[1] = "kiwi"
x = tuple(y)

print(x)
运行结果: