https://youtu.be/arxWaw-E8QQ

https://youtu.be/0Om2gYU6clE

Untitled

python optimizes memory utilization by allocating the same object reference to a new variable if object already exists with the same value.

At start, python pre-loads or caches a few the most commonly used objects, so that it doesn’t have to re-create them when needed.

Integers in the inclusive range -5 to 256 are also interned.

Untitled

== operator compares both list object element by element.

is keyword compares their address

Untitled

Function is also an object in Python. Function objects have a ‘defaults’ attribute which stores the default values as a tuple.

An object of Car() can be assigned to variable Z. Also, no specific data declaration is needed in Python.

Thats what it means to say that Python is dynamically typed language.

Every process is allocated with some memory by underlying OS. Python interpreter will receive its share for execution.

Memory is divided into Heap memory and Stack memory.

Methods are executed from stack memory.

Objects are created in heap memory, whereas references (variables) are created in stack memory.