Test Index
Python Revision Tour
© examsnet.com
Question : 66 of 102
Marks:
+1,
-0
State True or False :“In Python, tuple is a mutable data type”.
[CBSE 2024 Compartment]
Solution:
Concept:A mutable object can be changed in place after it is created (list, dictionary). An immutable object cannot be changed (int, float, string, tuple).Explanation:A tuple cannot be changed once it is created:
>>> T = (10, 20, 30)>>> T[0] = 5TypeError: 'tuple' object does not support item assignmentSo a tuple is an immutable data type and the statement is False.Key point: List is the mutable sequence; tuple is its immutable counterpart.Answer:Option B (False)
© examsnet.com
Go to Question: