QuestionQ14

VerifiedData Serialization

Which two Python data types are immutable?

Choose two
Explanation

In Python, integers and strings are immutable types — once an integer or string object is created, its value cannot be changed in place; any operation that appears to modify it actually creates a new object. Lists and dictionaries, by contrast, are mutable — their contents can be changed after creation using operations like append(), remove(), or key assignment, without creating a new object.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!