Computer Science

Find the errors. State reasons.

t = (1, "a", 9.2)
t[0] = 6

Python Tuples

5 Likes

Answer

t[0] = 6 will raise a TypeError as tuples are immutable (i.e., their elements cannot be changed after creation).

Answered By

3 Likes


Related Questions