Computer Science
What are Immutable and Mutable types in Python? List immutable and mutable types of Python.
Python Data Handling
62 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:
- Lists
- Dictionaries
- Sets
Immutable types in Python are:
- Integers
- Floating-Point numbers
- Booleans
- Strings
- Tuples
Answered By
34 Likes
Related Questions
What are three internal key-attributes of a value-variable in Python ? Explain with example.
What will following code print?
str1 = '''Hell o''' str2 = '''Hell\ o''' print(len(str1) > len(str2))
How many string types does Python support? How are they different from one another?
Is it true that if two objects return True for is operator, they will also return True for == operator?