Комментарии:
My question is how are you getting Python to output under Output and not the Terminal?
ОтветитьFor anyone wondering "Dunder" means double underscore
ОтветитьI think main guards are good to implemented in every script.
Ответитьty
Ответитьthank you!
ОтветитьIncredible
ОтветитьShort and sweet,thanks
ОтветитьC L E A N E S T 🔥🔥🔥🔥🔥🔥🔥🔥🔥
Ответитьfinally! an explanation to the use not complicated mechanism!
ОтветитьFinally. A very simple yet straightforward explanation. Thank you
ОтветитьPossibly the most concise and clear explanation of this variable!
ОтветитьI watched several videos yet still don't understand. my low iq
ОтветитьWhich Font are you using?
Ответитьgawd I love you
ОтветитьWhat theme are you using on vscode?
Ответить100% i'm not gonna put this in ALL my scripts. i'm going to make sure to only use them in scripts that need to be imported
ОтветитьInteresting . . . .
ОтветитьI wish i saw this video LAST NIGHT when I was doing my homework and could not for the life of me figure out how to not get my code to run twice... well you live and you learn lmao
Ответитьamazing..! Thank you for the video!
ОтветитьWhat theme do you use for VSCode? It looks so good
ОтветитьAs a beginner, i am confused fr
Ответитьgod, i have finally understood it
ОтветитьWhy wouldn't you remove the call to do something in script1 instead? Well I guess there are other real life complex situations where this is useful. Thanks it was straightforward
ОтветитьWhen you learning, sometimes you just need little videos to have a whole new understanding of what you're doing :D thank you so much
Ответитьthat is super simple. Really amazing!
ОтветитьBro you are awesome
Ответитьnee alutham lae
Ответитьikd python but wouldn't it be easier to add a guard clause before the "main execution" testing if it's NOT "__main__" and exiting if that's the case? so that your code isn't all indented
ОтветитьI wish there was a keyword for this. *if "__name__" == "__main__":* is just such an eye-sore.
ОтветитьSimple and useful explanation. Thanks. :)
Ответитьi have a dumb question.
why dont just remove " do_something() "
I don't get it. You're calling the function in both files but you only want it to run in one? What's the point of that? When would you ever need this?
Point is, any code you want to run in only one file should only be written in that file. This can be applied similarly to variables knowing their own name.
this is the third video on _name_ that i watched and it was the icing on the cake. i now fully understand what the purpose is, thank you so much!!!!!!!!!!!!!!!!!!
Ответитьor you could simply not call the function in the module from which you import? can someone please explain to me why is it needed? I guess I know what it does, syntax and whatnot but simply put, if youre not calling the functions/methods in not main module, why would you even use it when it doesnt run automatically?
Edit: okay I see it, useful only when you need to use it as a standalone script for testing so you can have bunch of function calls ready at hand otherwise no need if you aint calling it and why would you even call it or make print statements there since thats whats main module for
this was the explanation i needed. thank you
ОтветитьThanks a lot. Got it now.
ОтветитьThanks, Awesome crystal clear explanation
Ответитьall the 30 min videos and this was the best
Ответитьwatched a few other videos of this topic and yours was the most simple to understand, thank you!
I wish you had a full Python course video, would love to watch you guide us through from the very basic beginnings to more complex stuff in Python.
That’s a very useless example
ОтветитьI need the name of that theme please
ОтветитьNice fact
ОтветитьBro Your the best
ОтветитьWell_paced explanations...
ОтветитьOr you can remove the method call in Script1, import in Script2 and call the do_something() function from there.
ОтветитьHey do you have any course on udemy for python
ОтветитьThis is the simplest and clearest explanation I've come across for this. Thank you!
Ответить