How variables work in Python | Explained with Animations [See description/first comment]

Published: 01 July 2021
on channel: Sreekanth
74,764
2.9k

The same video is re-uploaded with better audio and minor corrections:    • How variables works in Python | Explained ...  

This video tries to explain how variables or name bindings work in Python and their internal representations like PyObject and PyVarObjects, using animations.

Intermediate level concepts like reference counting, garbage collection, how lists work internally, why python is a dynamically typed language, interning, None objects, equality operators like '==' and 'is', how 'del' works, how variables are passed into functions(pass by reference), issues with default mutable parameters, operator overloading and behaviour of augmented arithmetic assignment operators, the behaviour of mutable element in the tuple are also explained.

It also shows how mutable and immutable data types behave differently in some scenarios. This knowledge should be useful for people coming from other languages like C, Rust, or Golang and may enable them to write better Python code.

References
------------------
comments in CPython source code: https://github.com/python/cpython/blo...

Chapters
---------------
0:00 How variables works in C
0:49 How variables works in Python
3:12 How lists are represented internally
5:37 Interning
7:12 Equality operators
8:13 Pass by reference to functions
9:18 Mutable default parameters
11:24 Augmented arithmetic assignment operators
13:12 Mutable elements in Tuple


On this page of the site you can watch the video online How variables work in Python | Explained with Animations [See description/first comment] with a duration of hours minute second in good quality, which was uploaded by the user Sreekanth 01 July 2021, share the link with friends and acquaintances, this video has already been watched 74,764 times on youtube and it was liked by 2.9 thousand viewers. Enjoy your viewing!