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

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 105

  • @sanv9853
    @sanv9853 Рік тому +1

    thanks for putting together this explanation, after going through countless beginner tutorials i hit gold

  • @DrIT-qv1ek
    @DrIT-qv1ek 5 місяців тому

    Beyond exceptional. This is the only channel I have found that is non-trivial. Great job! The animations are great.

  • @ahmedouerfelli4709
    @ahmedouerfelli4709 2 роки тому +1

    This channel is underrated.

  • @sajjadhossan7972
    @sajjadhossan7972 3 роки тому +32

    You really have an unique way to teach with deep understanding about programming. Please continue with your work. We wants to learn more about python from you.

  • @kraken_norse
    @kraken_norse 10 місяців тому

    Thanks. I have been coding in Python for years and only learn this piece of fundamental knowledge from your video.

  • @iliya-malecki
    @iliya-malecki 2 роки тому +1

    Outstanding video, its like an ascii table that some nerds print and hang in their bedrooms - the quintessential information. I will save this video on a flash drive and will put it on my bedside table

  • @sudarshanvkudli9250
    @sudarshanvkudli9250 9 місяців тому

    This 15 minutes taught me more than what I learnt in a semester

  • @neoruss3553
    @neoruss3553 2 роки тому +5

    Watched almost all videos on advance topics of python. Even though i never used python i can say these advanced topics are same or very similar for 90% of other programming languages, so learning it once means you can use it in any other language.

  • @maksymilianbiruk6877
    @maksymilianbiruk6877 2 роки тому +15

    I have never seen such a better explanation than this before! Thank you so much for this video.

  • @sidlas420
    @sidlas420 3 роки тому +34

    Very good visuals. However a small suggestion that it would be even more impactful if you explained it rather than a robotic voice reading through the statements.

    • @sreekanthpr
      @sreekanthpr  3 роки тому +58

      Thank you. I used text to speech conversion because of two main reasons: first is that I don't have a good enough setup for recording audio and this is much easier, second I'm not a native english speaker, so some people may have difficulty with the accent.

    • @sidlas420
      @sidlas420 3 роки тому +14

      @@sreekanthpr - You are a very thoughtful person. Thank you for the extra effort you have put in

    • @rainforest3233
      @rainforest3233 2 роки тому +1

      @@sreekanthpr I like your content! Really helpful!! Maybe you can consider hiring someone or using a more natural voice.

    • @xiam19
      @xiam19 Рік тому

      Its perfect you just need to adjust the speed to 1,2x😅

  • @abhisekrout976
    @abhisekrout976 2 роки тому +1

    Very well explained. Your videos deserve more views.

  • @adrianosymphony
    @adrianosymphony 10 місяців тому

    in the time 07:01 (about 'some string' and 'some_string') don't work the same way if you run the code in a file and typing line by line in the interpreter. I tested here in some versions of python and the result was the same. Chat GPT told me why this heppended: "...when you run the code line by line in the Python interpreter, each line is executed independently, and the variables may not be stored in the same memory location. The Python interpreter, especially in interactive mode, may reuse memory for string literals that are equivalent. This is an optimization mechanism known as string interning."

  • @jannickharambe8550
    @jannickharambe8550 Рік тому

    holy shit this is really really good
    ive googled for quite a while now and couldnt find any good explanations
    thanks so much

  • @manishjain6294
    @manishjain6294 Рік тому +2

    Hey Sreekanth. The video is too good. Which book do you read? Request you to give the source of this please.

  • @arpankarmakar16
    @arpankarmakar16 2 роки тому +1

    You really understand python deeply! Great

  • @didimomani1565
    @didimomani1565 Рік тому

    u r great , I really didnt understand from anyone on youtube just you

  • @13MrMusic
    @13MrMusic Рік тому +1

    Extremely enlightening! Excelent job, extremely well done! It was very helpful

  • @АнтонВащенко-ь9р
    @АнтонВащенко-ь9р 3 роки тому +4

    It's a usefull lesson) I am the beginner in Python and as for me, this lesson was very interesting) Thank you, my friend for your work)

  • @rkvcherry5535
    @rkvcherry5535 Місяць тому

    Super useful information every python programmer need to see this you are great man and you rocked it🎉🎉

  • @AnantaAkash.Podder
    @AnantaAkash.Podder 6 місяців тому

    You really do have an Unique way of Explaining things to others

  • @winterwilderness5073
    @winterwilderness5073 Рік тому +2

    Very thorough explanation and vivid visualization. Thank you so much for your efforts in producing such extraordinary contents!

  • @AnantaAkash.Podder
    @AnantaAkash.Podder 6 місяців тому

    This by far the Best... In terms of explaining how Python Variables are Stored

  • @priyankagupta119
    @priyankagupta119 2 роки тому +4

    Your videos are very helpful and give me deep understanding of the concepts in Python. Request you to please make a full playlist of Python-Basic, Medium, Advance concepts. Thank you so much !!

  • @kakarot1223
    @kakarot1223 3 роки тому +2

    great video mate, never knew about all this despite using python for some while

  • @johnlemon9660
    @johnlemon9660 2 роки тому +1

    thanks bro! these topics rarely get touched as well as rarely taught visually well. what did you use to make these animations?

    • @sreekanthpr
      @sreekanthpr  2 роки тому +1

      I use github.com/ManimCommunity/manim to generate the video.

  • @artemtitov8657
    @artemtitov8657 9 місяців тому +2

    BRO U ARE CRAZY!!! ITS FIRE!!! Where do you get such detailed information from? only the source code?

  • @DjWhitefoxMadrid
    @DjWhitefoxMadrid 3 роки тому +1

    Must watch tutorial.
    Please keep it up with more like this.
    Thank you!

  • @catchalok3
    @catchalok3 3 роки тому +2

    This is by far the best explanations which I have come across. Sometimes, speech is fast. For this, I am using playback speed of "0.75" and it works very well for me.

    • @mohammadarshad8301
      @mohammadarshad8301 3 роки тому +1

      I think he has purposely increased the speed because of 2 reasons:
      1) He is aware of the fact that when the UA-cam video is watched slowing down, it gets recommended to much wider audience and watch time increases.
      2) He is confident about the content and so think that no one will think to let go these videos just because it's little' bit faster.

  • @adityachoudhari1158
    @adityachoudhari1158 2 роки тому +1

    Thank-you!
    It's what i was looking for.

  • @sureshonteru4609
    @sureshonteru4609 Рік тому

    This video helped me a lot , Thank you so much.
    Am requesting you create a more videos in python

  • @cb9493
    @cb9493 8 місяців тому

    Best explanation ever, thanks a million!!!!

  • @TechTutorialswithPiyush
    @TechTutorialswithPiyush 3 роки тому +1

    That was really amazing, would you be able to share the tools you have used for recording, is that a powerpoint or any other tool? Which application you have used for speech? Really impressed with the way you have delivered! Nailed it

    • @sreekanthpr
      @sreekanthpr  3 роки тому +4

      github.com/3b1b/manim for generating the video. One note >> view >> immersive reader for the audio. Davinci resolve for final mixing of video, audio and subtitles

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush 3 роки тому

      @@sreekanthpr That's awesome! Thank you very much for sharing. I wish you a great success ahead for your channel

  • @jpsan1735
    @jpsan1735 2 роки тому +1

    Thank for your video. It help me a lot to understand the core of python :33

  • @MAMUN-zo9tv
    @MAMUN-zo9tv Рік тому +1

    Just wow 😍😍😍😍

  • @gena8414
    @gena8414 11 місяців тому

    very interesting. covers the memory model of python variables really well. Now I can predict the behaviour of code by drawing out a PyObject pointer diagram.

  • @clipdat345
    @clipdat345 2 роки тому +1

    impressive explanation, thank you!

  • @akmzahidulislam2764
    @akmzahidulislam2764 2 роки тому

    Excellent explanation. Thanks a lot. Correction: At 9:08, the name of the function should be the same, ie add_ten_to_list. Mistakenly mentioned as add_one_to_list.

  • @sohailshah1574
    @sohailshah1574 Рік тому

    Please more videos related to python.. what a visualization Thank you so much sir

  • @arlaxia
    @arlaxia 2 роки тому +1

    Really great animations and explanations. It was really informative and visual.

  • @t.m7617
    @t.m7617 2 роки тому

    04:20 will the PyObject(s) reference count remain 1 no matter how many variables I assign to the PyVarObject?

  • @rvoros
    @rvoros Рік тому

    absolutely spot on explanation with excellent examples

  • @JosueZelayah
    @JosueZelayah Рік тому

    Dude you nailed it! Excellent work!

  • @maximilianoo86
    @maximilianoo86 3 роки тому +1

    Incredible material, very clear! Thank you so much for this!

  • @fratquintero7402
    @fratquintero7402 3 роки тому +2

    Please, make more videos! You are awesome!

    • @sreekanthpr
      @sreekanthpr  3 роки тому +1

      Thanks. I'm working on the next one. Will try to upload it this week itself.

  • @ahmedsamir-qw1zp
    @ahmedsamir-qw1zp 2 роки тому

    too much helpful, and excellent demonstration ... could you send a reference on this topic to go deeper, please

  • @me-jn1zl
    @me-jn1zl Рік тому +7

    I have seen 4 of your videos in a row... THEY ARE EXCELENT!!! you are a great teacher... Please continue uploading such quality videos 🙏 HAVENT SEEN ANYTHING SO WELL EXPLAINED AS YOUR VIDEOS

  • @jakub1908
    @jakub1908 3 роки тому +1

    Keep going, great job!

  • @halciik
    @halciik Рік тому

    This is what i wanted to know! Thanks!

  • @ВисалИнг
    @ВисалИнг Рік тому

    Is the term object and value in python equivalent? Or object consider a box and a value is what the box contained?

  • @MagnusAnand
    @MagnusAnand 10 місяців тому

    This is a fantastic video and explanation

  • @RahulSharma-lw2ss
    @RahulSharma-lw2ss Рік тому

    Very exceptionally explained. Thankyou

  • @witoldzolnowski7067
    @witoldzolnowski7067 Рік тому

    great content, keep up the good work

  • @khardu
    @khardu 3 роки тому +1

    Thank you for sharing your hard-work and knowledge for free. Could you please make it a little slower for your future videos. It's hard to keep up with the pace for python beginners and non-natives like me.

  • @polarbear986
    @polarbear986 Рік тому

    Very good explanation !!

  • @ahmedghallab5342
    @ahmedghallab5342 Рік тому

    شكرا جزيلا 💙💙💙thanks

  • @mishalpatel514
    @mishalpatel514 2 роки тому +1

    Nice!😊
    Could you please tell me from where did you learn this?

    • @sreekanthpr
      @sreekanthpr  2 роки тому +2

      Comments from Python interpreter's source code github.com/python/cpython/blob/f572cbf1faab33d9afbbe3e95738ed6fbe6e48e6/Include/object.h#L9 and some specifics I started to notice when I learn another language and come back to Python.

    • @mishalpatel514
      @mishalpatel514 2 роки тому +1

      @@sreekanthpr That's so cool man! Please keep making more videos.😊

  • @AnupSPai
    @AnupSPai 3 роки тому +1

    this helped me a lot, thank you so much!..

  • @nunorodrigues5628
    @nunorodrigues5628 2 роки тому

    awesome video mate

  • @richardharris202
    @richardharris202 9 місяців тому

    such a underrated video!
    what is your linkedin bruh!

  • @minhphamvan8993
    @minhphamvan8993 3 місяці тому

    much help video, thanks guys

  • @sozo4755
    @sozo4755 2 роки тому

    it's very helpful content, thanks

  • @sohailshah1574
    @sohailshah1574 Рік тому

    Please more videos related to python.. what a visualization Thank you so much sir ...
    And one more thing, can i use your visualization for Instagram post?

  • @murodalinarzullaev5955
    @murodalinarzullaev5955 3 місяці тому

    thanks for class, can you share used Presentation?

  • @mehdichellak4373
    @mehdichellak4373 2 роки тому +1

    I type the same code as you:
    x = 42
    y = 42
    print(x == y) # true
    print(y is x) # true
    print(id(x), id(y))
    x = -257000
    y = -257000
    print(x == y) # true
    print(y is x) # true
    print(id(x), id(y))

  • @vvuonghn
    @vvuonghn Рік тому

    This video is awesome

  • @zeinabezz1426
    @zeinabezz1426 2 роки тому

    First, I'd like to thank you about your very powerful videos
    You say that list are stored in arrays... But what about tuples, sets, and dictionary??

  • @sreekanthpr
    @sreekanthpr  Рік тому +2

    *The same video is re-uploaded with better audio and minor corrections:* ua-cam.com/video/Bz3ir-vKqkk/v-deo.html

  • @DhavalAhir10
    @DhavalAhir10 3 місяці тому

    How to contact you bro?
    I have 2 question in Python.
    If you can able to answer.

  • @lilyzheng2322
    @lilyzheng2322 Рік тому

    this make so much sense

  • @sungchulyonseiackr
    @sungchulyonseiackr 2 роки тому

    Simply Great!

  • @AnantaAkash.Podder
    @AnantaAkash.Podder 6 місяців тому

    Thank You Sir...

  • @keizbot
    @keizbot 13 днів тому

    So every variable is heap allocated... sounds like a cache locality nightmare

  • @Yassine-it6rp
    @Yassine-it6rp 11 місяців тому

    so good man

  • @orgoon7697
    @orgoon7697 Рік тому

    Outstanding, thx

  • @ttoommxxmmoott
    @ttoommxxmmoott Рік тому

    I wonder how had the brilliant idea to create the += operator, it's just extremely confusing unless you know exactly what you are doing

  • @tanmaychavan743
    @tanmaychavan743 Рік тому

    Why did you stop uploading videos 😢, they are so damn Good than any other channels.

  • @Pedritox0953
    @Pedritox0953 Рік тому

    Great video!

  • @umi_nari
    @umi_nari 10 місяців тому

    great video thks 🙏

  • @hrtrfli2702
    @hrtrfli2702 3 роки тому

    İt is usefull ,so much , thank you very much.

  • @JohnWickXD
    @JohnWickXD Рік тому

    Thanku so much!

  • @boutiflet
    @boutiflet 3 роки тому

    Awesome !

  • @biswajitdas4214
    @biswajitdas4214 2 роки тому

    Awesome beautiful

  • @МаксимШаламов-ш8ш
    @МаксимШаламов-ш8ш 3 роки тому

    great job!

  • @M.I.S
    @M.I.S Рік тому

    thank YOU!

  • @olivierTUBO
    @olivierTUBO 3 роки тому

    Thanx for doing this

  • @armanmalkhasyan4765
    @armanmalkhasyan4765 3 роки тому

    Thank you very much

  • @stephanosc7728
    @stephanosc7728 2 роки тому

    Clear

  • @itsmaxim01
    @itsmaxim01 Рік тому

    me using try {} catch {} to push items to the immutable array:

  • @innercircletradertevision
    @innercircletradertevision 8 місяців тому

    I am tired

  • @AA-cr6gd
    @AA-cr6gd 2 роки тому

    6

  • @actuallyStryder
    @actuallyStryder 3 місяці тому

    AI uncanny valley voices are bad and you should feel bad.

  • @user-jm6gp2qc8x
    @user-jm6gp2qc8x 3 місяці тому

    what the actual fuck

  • @sohailshah1574
    @sohailshah1574 Рік тому

    Please more videos related to python.. what a visualization Thank you so much sir