7
Question Question 7
What are Immutable and Mutable types in Python? 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:
- Lists
- Dictionaries
- Sets
Immutable types in Python are:
- Integers
- Floating-Point numbers
- Booleans
- Strings
- Tuples