18
Question Question 3(b)
Carefully read the given code fragments and figure out the errors that the code may produce.
t = ('a', 'b', 'c', 'd', 'e')
t[0] = 'A'
Output
TypeError: 'tuple' object does not support item assignment
Explanation
Tuple is a collection of ordered and unchangeable items as they are immutable. So once a tuple is created we can neither change nor add new values to it.