CBSE Class 12 Computer Science Question 39 of 105

Python Revision Tour II — Question 18

Back to all questions
18
Question

Question 18

Suppose a tuple T is declared as T = (10, 12, 43, 39), which of the following is incorrect ?

  1. print(T[1])
  2. T[2] = -29
  3. print(max(T))
  4. print(len(T))
Answer

T[2] = -29

Reason — Tuples are immutable. Hence we cannot perform item-assignment in tuples.