demo_tuple_add.py:
thistuple = ("apple", "banana", "cherry") thistuple[3] = "orange" # This will raise an error print(thistuple)
C:\Users\My Name>python demo_tuple_add.py
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