Question:

In Python, which data type is immutable?

Show Hint

Think of a List as a pencil-written list (you can erase and change it) and a Tuple as one written in permanent ink. Use Tuples when you want to make sure your data stays constant throughout the program.
Updated On: May 30, 2026
  • List
  • Dictionary
  • Set
  • Tuple
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation


Step 1: Understanding the Concept:

In programming, "mutability" refers to whether an object's state or content can be changed after it is created. Immutable objects cannot be changed, while mutable objects can.

Step 2: Detailed Explanation:


Mutable (Can change): Lists, Dictionaries, and Sets allow you to add, remove, or modify elements in place.
Immutable (Cannot change): Tuples, Strings, and Integers do not allow modification. Once a tuple is created, you cannot change its elements or its size.

Step 3: Final Answer:

The Tuple is the immutable data type among the options.
Was this answer helpful?
0
0