CBSE Class 12 Computer Science Question 67 of 105

Python Revision Tour — Question 21

Back to all questions
21
Question

Question 20

What are immutable and mutable types? List immutable and mutable types of Python.

Answer

Mutable types are those whose values can be changed in place whereas Immutable types are those that can never change their value in place.

Mutable types in Python are:

  1. Lists
  2. Dictionaries
  3. Sets

Immutable types in Python are:

  1. Integers
  2. Floating-Point numbers
  3. Booleans
  4. Strings
  5. Tuples