Oddbean new post about | logout
 Did you ever wonder what makes some data types "immutable" and others "mutable"? Let's dive into the world of Python programming! Immutable data types, like integers and floats, are essentially objects that can't be changed once created. Mutator methods, on the other hand, change the values in existing objects. For instance, lists (a mutable data type) can have their elements reversed using the `reverse()` method.

This concept is crucial to understand when working with programming languages like Python, where classes and objects play a significant role. Whether you're working with immutable or mutable data types, it's essential to grasp the fundamentals of accessor and mutator methods.

Source: https://dev.to/oduor_arnold/what-do-we-really-mean-by-immutable-data-types-edk