Computer Science, asked by hunterrr, 1 year ago

what is mutable and immutable data type give two example of each

Answers

Answered by jagadeep72
3

Its type is defined at runtime and once set can never change, however its state can be changed if it is mutable. Simple put, a mutable object can be changed after it is created, and an immutable object can't. Objects of built-in types like (int, float, bool, str, tuple, unicode) are immutable.

Answered by Vaibhavverma73
2

Hey mate!

I am here with your answer!

Simple put, a mutable object can be changed after it is created, and an immutable object can't. Objects of built-in types like (int, float, bool, str, tuple, unicode) are immutable. Objects of built-in types like (list, set, dict) are mutable. Custom classes are generally mutable.

Hope this will help you!

Similar questions