What is a Variable in Python? Mutable vs Immutable

preview_player
Показать описание
In this video, we will tackle some of Python's most fundamental topics that every single Python developer HAS to understand! By the end of this video I hope that you'll be able to confidently answer the following questions: What is a variable in Python? What is mutability? Explain Mutable VS Immutable in Python. What is a pointer? All of these questions are essential to understanding how Python actually works and deals with variables. These questions can also be asked during any Python development position interview. I hope you'll learn a lot from watching this video!

🚀 If you'd like to support my channel, you can do so either as:

Don't forget to like, if you want to learn even MORE Python!

00:00 Intro
00:44 What is a Variable
02:43 Mutable vs Immutable
04:13 Mutable Deep Dive
06:30 Immutable Deep Dive
08:13 Variable Equal Variable
11:50 Copy Mutable Objects

#python #pythonprogramming #pythontutorial #mutable #immutable #variablesinpython
Рекомендации по теме
Комментарии
Автор

Maaannn. You're an awesome pedagogue who knows to explain coding even to children. Thank you for your generosity to share your knowledge with the rest of the world. Be Blessed and Successful in all your actions. Salutations from France.

xyzxyz
Автор

A slight correction, 1:06 Java, like Python store references in variables.
Otherwise, a really great video, I just found your channel and I'm already a fan ⚘️

Yazan_Majdalawi
Автор

Function side effects in Python are criminally insane

yoavmor
Автор

Wow, this tutorial is absolutely fantastic! 🙌 Your explanation is clear and concise, and I love the way you break down complex topics. You have a real talent for teaching, and it's so easy to follow along with your explanations. Keep up the amazing work, and I can't wait to see more tutorials from you in the future!

chadisfeir
Автор

This is amazing. I now know why the hell I can not work with linked lists and other datastructures in python. I had no idea how they actually worked. Now I know.

thxenos
Автор

awesome explanation, love the graphics!

sarode
Автор

This was great to learn! Thanks for the great explanation. Looking forward to more videos :)

mitchhudsonmusic
Автор

Dude, you are good doing these videos. Be aware of that

allanatal
Автор

I just found out you only have 3 videos, this makes me sad. I hope you can quickly make other videos, because I need your knowledge!
On the other hand, I can say I was a subscriber even before you reach 250 subs. I think you will reach 100K in no time, your work is amazing.

thxenos
Автор

Thanks for sharing this great content!

lazy-mmlj
Автор

come from sub. Fond of your clear voice and explanation! Excellent! Waiting more videos!

Andy-bbk
Автор

Awesome video !! Thanks for the clear explanation👌🏻

joannamoussajm
Автор

Thank you so much for the visual representation of this concept! I just have one question on that, i see that you highlight chrome, python and OS in different colors, but to be more accurate with the memory diagram representation, isnt everything you have shown happening inside the python application/interpreter? So basically python is looking for free memory space within the python application you ve represented with its color(im not naming the colors because i dont distinguish them so well and dont wanna make a fool of myself here). Also, the python interpreter is as you ve represented, a standalone application running in RAM and all variables assignment happen in the python application interprer which is represented in your case with i think red color?am i right?

adrianoros
Автор

Fantastic video! Your content is not only informative but also engaging. The way you explained variables in python was clear and easy to follow.
Keep up the great work – looking forward to more insightful videos from your channel!
Also please create a video explaining list & shallow copy in python

jaimalad
Автор

This helped me out a lot! Is there an easy way to determine whether a variable is mutable or not? The example in my head is when I spent hours trying to figure out why my code wasn't working, only to find out that cv2.imread returns an immutable Numpy array 🙈

Also new video idea: How does the memory allocation work when passing variables to classes or functions? I personally find it quite confusing

greggoryzinniel
Автор

Just asking: For making the first letter capital, couldn't you just have transformed the name into a string and then converted it back to a string?

danielkutomi
Автор

how is it possible for the list to be resized but the memory location to always remain the same? What if there were other objects allocated behind the end of the list such that there is not space to append additional items?

Ryan-inot
Автор

Can it be called a variable if it's immutable?
If not, then it's really a constant.

PhrontDoor
Автор

"How variables are copied". They aren't, objects are.

"How variables are passed to functions". They aren't, objects are.

Variable is a bad term. Binding is a good term.