Mutable and Immutable Objects

Mutable Object:

Immutable Object:

List of Mutable and Immutable objects :

  • Python handles mutable and immutable objects in different ways.
  • Mutable objects are of great use in scenarios where there is a need to change the object size (e.g., list, set, and so on…).
  • Immutable objects’s are used when you want an object you created to always stay the same as it was when created.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store