Grateful that I managed to find this after several videos, managed to get the concept straight away after watching this. Thanks for the crystal explanation and the example.
holy shit, I spent like an hour trying to figure out what this means, but every website went into so much details that I got so confused. it was simply that __name__ was = to __main__ when running it directly from the program it was created in at first or __name __ is = to that particular file name it was created in when its imported into another program. Thank you!
I am checking again from you, why anyone will in first place write a statement to run the same module which has been defined above. What purpose it would serve in the first place. If have to run the module I will import it and then run the function. First I unnecessarily put code inside my module file to run the code and then put if __name__=“__main__” to prevent it from running. One reason for putting such code is to make .py file more versatile, it can be run directly without importing hence use of less memory and can be imported and run as and when required inside another application. Please enlighten us. Thanks in advance.
I have watched a couple of videos on this topic and they didn't do any good except more confusion. But this explanation so clear without going around the bush. Keep us the good work. 👏
I understand how it's used but not why there is a use for it. The return statement in a function is syntactically used to exit a function, why would there be additional statements after the return statement? Seems like bad programming, not sure how, when or why there is a use case for this...anybody knows?
Grateful that I managed to find this after several videos, managed to get the concept straight away after watching this. Thanks for the crystal explanation and the example.
Best ever tutorial on name==main
holy shit, I spent like an hour trying to figure out what this means, but every website went into so much details that I got so confused. it was simply that __name__ was = to __main__ when running it directly from the program it was created in at first or __name __ is = to that particular file name it was created in when its imported into another program. Thank you!
I’ve been struggling to understand this concept with all other videos, and you gave me eureka!!🎉 thank you!
Great explanation of if __name__ == "__main__":
perfect concise explanation for me. Thanks so much. I was very confused before. Now I totally understand
i was wandering here and there looking for precise explanation for this and you explained it very well sir thank you so much
Very clear explanation
This video: Me: imports 500 libraries into Hello World.py program
Well Done Sir. I am not confused anymore. TY
Best explanation. Thank you very much
I am checking again from you, why anyone will in first place write a statement to run the same module which has been defined above. What purpose it would serve in the first place. If have to run the module I will import it and then run the function. First I unnecessarily put code inside my module file to run the code and then put if __name__=“__main__” to prevent it from running. One reason for putting such code is to make .py file more versatile, it can be run directly without importing hence use of less memory and can be imported and run as and when required inside another application. Please enlighten us. Thanks in advance.
Very clear, didnt get the proper idea, while watching other videos in youtube
Very clear explanation
Thank you
thanks for this
💯💯💯💯💯💯💯💯💯💯💯💯💯💯💯
Good explanation. Thank you.
Thanks for this good video.
Very clear explanation. Thank you!
tnx for this turtrial ,finally i understood this
Now it makes sense! Thanks bro...
Best explanation
nice explaintion
Amazing explanation
Amazing and concise explanation, sir. Thank you very much!
thanks for the video you help me a lot
Very good explanation and example! Thank you!
best explanation ever
I have watched a couple of videos on this topic and they didn't do any good except more confusion. But this explanation so clear without going around the bush. Keep us the good work. 👏
best explanation😃
Great video and clear explanation. Keep up the good work!
thank you so much sir!!!!!!!!!!
nice explanation
great explanation thanks a lot!
Great video! Really broke it down. Thumbs up! :)
Top video, so easily understandable ! Thanks a lot! 👍👍👍
Perfect example!
Excellent explanation!
After watching 5 to 6 vdos finally understood here
U made it so clear that I subscribed you :D
🌟Good !👍👆👏😎🌟
3 blogs, 2 videos - No use
This 1 video - Enough
good job! quite explicit
well explained
Awesome explanation.
Beautiful explanation thanq
Thanks a lot for making many useful video and playlist tutorial like this.
Really helpful for CS student like me.
:)
Watched 3 videos before this but didn't get it. Thanks for clarifying in such as a simple way.
Thank you!
Very helpful, love you ):D
Great
does the spawned process also get the same __main__ value for __name__? how does this work with multiprocessing?
awesome explanation 👌cant be better 👍
What IDE do you use?
Pycharm
@@usama57926 thank you
Thank man
thank you...
Can we use "from mymath import add" ?
I think we can
My first year lecturer spoke with that same exact ascent 😂
which college?
best one
thx man
I understand how it's used but not why there is a use for it. The return statement in a function is syntactically used to exit a function, why would there be additional statements after the return statement? Seems like bad programming, not sure how, when or why there is a use case for this...anybody knows?
How result invalid syntax
test.py the universal name😂😂😂😂
buyuksun hoca
great explanation, but too much underscores!!! )) its dunder methods
good explanation