代码示例:(标识:demo_python_tuple_add)
thistuple = ("apple", "banana", "cherry")
thistuple[3] = "orange" # This will raise an error
print(thistuple)
运行结果: