Mutable, Immutable… everything is object!

type(object)
type(name, bases, dict)

Input:

Output:

class 'int'
class 'str'
class 'list'

Mutable objects :

Immutable objects :

why does it matter and how differently does Python treat mutable and immutable objects ?

how arguments are passed to functions and what does that imply for mutable and immutable objects?

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data Science — Skills Focus — GitHub Clone Every Repo from a User or Organization

Recursion

The Raw & Real Approach to Observability — Honeycomb

Photo of white dog with blue eyes taking a treat from a person’s hand.

End To End Project Example In Mediapipe

Push notifications in Multi-Module App

Getting Started With AWS AppSync

How To Secure Your ARK Node

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
Ahmed Omar MILADI

Ahmed Omar MILADI

More from Medium

Music | Catwalk X Merykid | Faster

Shoulder Press Exercise Analysis using OpenCV and MediaPipe (with visualization)

Daniel Cainer Returns to the SoHo Playhouse

Keeping Your Computer Microphone and Camera Secure