Your explanation of coding is truly ingenious. Suddenly, all those encrypted coding lines aren't that confusing anymore.
@MoonFrogg Жыл бұрын
these are VERY important things to learn, love the video and thanks for the clear + concise explanation!!
@AntonioZL Жыл бұрын
2:34 while this is indeed obvious for anyone experienced with interpreted languages, it could be confusing for begginers coming from compiled languages, like C, which is quite commonly used in intro to programming classes, so it's worth to point it out.
@epsi Жыл бұрын
I think you meant it's obvious for anyone experienced with compiled languages. Some interpreted languages like JavaScript, awk, various BASIC dialects, and some flavors of shell script do not require variables to be defined before they are used. I've never encountered a compiled language that allows you to use a variable without first defining it.
@aliplayer1 Жыл бұрын
Love the videos. Concise yet full of information for new learners. Thanks.
@曾忠凱 Жыл бұрын
Man your video really helps. I couldn't understand the explanation on the official doc. Tyvm!
@NickWrightDataYT Жыл бұрын
Great stuff! Good to learn more about how Python "thinks" lol
@birzhanabdikhan8175 Жыл бұрын
1:37 by first-indentation he means that variable was defined outside of classes and functions. This part confused me too because I though that he meant 1st line.
@soniablanche567211 ай бұрын
I knew of "global", but I didn't know about "nonlocal"
@harshaljani22663 ай бұрын
If there were 4 functions nested then would there be a way to access the 2nd function’s variable in the innermost 4th function?
@eric_d Жыл бұрын
I didn't participate in the poll, but from very recent experience I knew it would be an error as soon as I looked at it. A couple weeks ago I was working on a script where I wanted to redefine a global variable, but I didn't use global inside the function. What's even weirder is I tried doing it with 2 different variables, and only the second one gave an error. The first variable was redefined, and printed what I was expecting, but then I got the error when trying to print the second variable. This may be a bug in Python 3.10 that I need to further explore.
@LilJollyJoker11 ай бұрын
Thank you for this video!
@SusanAmberBruce Жыл бұрын
Probably one of the most important videos to watch if someone is new to python
@porlando12 Жыл бұрын
Wow this was awesome. Your channel is criminally underrated!
@FocusProjАй бұрын
Very applied learning! Thank you!
@naifal-ghamdi483 Жыл бұрын
Best scope explanation ever, many thanks to you
@montagetm Жыл бұрын
What if you want to reference a local variable two scopes out, how would you do that? Nonlocal only references the previous scope and global only references the global scope.
@epsi Жыл бұрын
def outer(): x = 1 def inner(): # x = 2 def func(): nonlocal x # refers to x=1 If you uncomment the x=2 line, you'd be referencing that x variable instead, and you'd be forced to rename one of those two x variables to be able to reference both of them. The nonlocal keyword is kind of a hack because Python is designed in a way that it prefers creating shadowed variables instead of unexpectedly modifying variables from outside scopes. Unfortunately, that means you encounter variable shadowing issues more frequently if you don't name things uniquely enough, along with the surprising error that is the answer to the poll question.
@montagetm Жыл бұрын
@@epsi so the only way is basically to rename them or remove them
@epsi Жыл бұрын
@@montagetm Yes, but that's true for any other language as well. Variable shadowing: just don't do it.
@nadiaezzarhouni300 Жыл бұрын
Bro you are insane, can you do a python course , by the way where do you get all this knowledge
@bab495311 ай бұрын
ur channel deserves more subs. Your content is amazing👍
@mind_of_a_darkhorse Жыл бұрын
Great explanation of scope! You made it very easy to understand!
@BiyHappy Жыл бұрын
Thanks man what a smooth explanation
@mossdem Жыл бұрын
Could you do a video which does a clear breakdown of classes?
@SHAYANGUHA5 ай бұрын
really informative 😍😍😍😍😍
@yazanabdoush70308 ай бұрын
Can you share what color theme you are using?
@killerboyak10 ай бұрын
Amazing Explanation , Thank you.
@tobiasm161 Жыл бұрын
Great explanation with examples ! Bravo I would love to see kind a approach about OOP. Because sometimes there is an overkill to use it. But otherwise its good practice i think. What do you think or whats your approach. I tend to do less OOP cause often "one time" use of my scripts
@yaraa.a523711 ай бұрын
the music is fire it got me dancing. and it remind me of minecraft
@alanlado1602 Жыл бұрын
I like the way you explain things. Subscribe button smashed.
@samsungcurved3 ай бұрын
Which theme you are using?
@adammarley561611 ай бұрын
Beautifully taught!
@elancedin7204 Жыл бұрын
bro literally did a few vids and already 82k subs, gut 4 u
@vuIent Жыл бұрын
Good video
@OsirisRD Жыл бұрын
what is your theme vscode ?
@Joe_Brig Жыл бұрын
2:30 not obvious if you coming from a compiled language.
@saadqayyum4739 Жыл бұрын
i though python was interpreded so it reads code line by line, shouldn't it print x and then make a local variable x instead of giving error
@faisal99129 Жыл бұрын
very good explanation... very helpful
@xcc4010 Жыл бұрын
What is the name of the theme?
@KrAsHeDD Жыл бұрын
Thanks, you answered my awaited long question.
@sayanta016 ай бұрын
thanks man
@rabi_saith2 ай бұрын
Thanks
@vvv3876 Жыл бұрын
I learned this on practice, i wish i viewed this video before
@arunalakmal90319 ай бұрын
Thnak you broo!!!
@swaggitypigfig8413 Жыл бұрын
Can you do a video on 360 no scope in Python next?
@sungodfatih Жыл бұрын
Thank you for this great explaination!
@dongchen7940 Жыл бұрын
There is no compile time in python, it is called interpret.
@charlesrussell6183 Жыл бұрын
great explanation
@udishe Жыл бұрын
Ty
@Nicky411 Жыл бұрын
Lovely video!
@karthiksundaram544 Жыл бұрын
Great stuff
@ismahelo Жыл бұрын
What font is that? And what theme?
@amoghgc87128 ай бұрын
SynthWave '84
@reynaparker29614 ай бұрын
5:26
@magdalenacoman91207 ай бұрын
bru put the music louder pls
@KeithKazamaFlick Жыл бұрын
dont use global guys.
@TMinusRecords Жыл бұрын
9:17 This whole thing is a disgusting mess
@Hotwire_RCTrix8 ай бұрын
This language is conflicting coming from C++. We were taught that this kind of programming was for those ignorant BASIC programmers of the 70s. 😳