Python Im/Mutable Ninja Objects

or Everything about mutable and immutable objects in Python

Source: https://realpython.com/python-data-structures/

OOP…s I did it again

Objects

What is an id?

What is type?

Some examples of the function type( )

Mutability

  • Which data types are mutable?
    Some of Python’s mutable data types are: lists, byte arrays, sets, and dictionaries.
  • Which data types are immutable?
    Some immutable types include numeric data types, strings, bytes, frozen sets (a special version of sets), and tuples.

Ambiguity

--

--

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