Computer Science

What are Immutable and Mutable types in Python? List immutable and mutable types of Python.

Python Data Handling

61 Likes

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

Answered By

34 Likes


Related Questions