Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
thistuple = ("apple", "banana", "cherry") thistuple[3] = "orange" # This will raise an error print(thistuple)
Traceback (most recent call last):
File "demo_tuple_add.py", line 2, in <module>
thistuple[3] = "orange" # This will raise an error
TypeError: 'tuple' object does not support item assignment