Summary of this video 1-They are two modules name demo and calc 2- when you are working on demo and print(_name ) Output- _main_(because it is starting point of a code) 3- Now we will work on calc and print hello _name_ Output- hello _main_ This is happening and it is giving name as main output because we are working on same module Now when we import one module to other ( import calc to demo) 1- All the things in calc will be printed along with demo statements 2- but it will print hello calc (the module name ) Instead of hello main Because we are importing it to other module "sooo when you are importing it in same module it will give name output as main And if in other module it will give name output along with module name...... that's it❤ Thanku sooo much sir great work Lots of blessing by one of your alien😅❤
@srijanmishra2447 Жыл бұрын
I reached till this video and while this video and last video 3 times then I understand about module and library as module this is beauty, I don't whether you reply or not but please tell me if I watched all python lectures and revise it, will I able to known s programmer
@jananivamp8 ай бұрын
@@srijanmishra2447 you need to practice it with real world applications
@jedits78355 ай бұрын
@@srijanmishra2447 what are u doing now
@arjunyadav-kt5jr5 жыл бұрын
guys u need to watch it more than once, he is crystal clear.
@technologyandinnovation45864 жыл бұрын
stop kissing up to him. It is free so we tolerate lower standard of teaching. The video has echo, he talks fast makes mistakes in method of teaching (see the number of edits), and fails to meet teaching standard for not to use a name with similar sounding names in a echo room i.e. "name" and "main".
@_.sunnyraj._4 жыл бұрын
@@technologyandinnovation4586 🙁
@karruramesh97984 жыл бұрын
@@technologyandinnovation4586 sir is crystal clear
@debjanighosh78754 жыл бұрын
@@technologyandinnovation4586 you r jealous..
@SupriyaMondal34 жыл бұрын
@@technologyandinnovation4586 yet I can understand what he is teaching. have you ever watched MIT free course channel? how their video and audio quality is not so good, as per your logic that is also low standard LOL!!
@thebrothershow58264 жыл бұрын
best video i'have ever seen about __name__ == "__main__",i don't understand why people can't uderstand the video,it was really clear
@IamNavi74 жыл бұрын
i don't know whether you will ever read this comment or not. But Bro , you are the only reason i could learn python in this efficient way. You are crystal clear in every topic and your delivery skills are on another level. I had watched many other videos also but no one was able to replace yours. You are awesome!
@dhruvsovasaria3 жыл бұрын
Now that you've learnt python , can you tell me how has it helped you?
@anushagloryi8350 Жыл бұрын
In which to do this coding could you intimate
@abhijeetkumar22045 жыл бұрын
Watched this 3 times finally understood ... thank you sir.u r one of the best teacher.
@Jaysalm4 жыл бұрын
Once you watch it a couple times it really starts to make a lot of sense. Thank you
@chingyee28044 жыл бұрын
after so many videos and forums about __name__ and __main__, finally this video let me understand clearly what is it and what it does. Thanks!
@mohinulislammohin77413 жыл бұрын
You've beaten my instructor and made my concept clear. Gratitude.
@EUCitizenFedUpWithAllThisCrap3 жыл бұрын
Really, brilliant brilliant explination. Love your flow, very easy for my brain to follow.
@premprasad3511 Жыл бұрын
This is the clearest explanation of name, main I have seen anywhere. Thank you
@anugupta37274 жыл бұрын
So, I was wondering from months , why do we use it. Today , my doubt got cleared finally . Thanks telusko
@janosszeman99055 ай бұрын
After watching 3-4 videos about it, I finally get it! Your explanation is very clear and understandable. Thank you very much!
@zakiasmaa68342 ай бұрын
In Python, __name__ is a special variable that tells you if a script is being run directly or if it's being imported into another script. How It Works When a script is run directly: __name__ is set to "__main__". When a script is imported: __name__ is set to the script's name. Thanks a lot Sir 🥰
@pavanjain21786 жыл бұрын
Sir i think one more video is required for __name__ to get it clearly understood so plz sir give something practical about it thankyou sir
@lovekumar76226 жыл бұрын
Yes sir ✋
@hariprasadcb4 жыл бұрын
you should give two _ at each side
@Lanxxe4 жыл бұрын
@@hariprasadcb He did but two were misinterpreted by KZbin and put name in italics
@sumanth50874 жыл бұрын
__name__
@diahidvegi85365 жыл бұрын
watched it 3 times, it's crystal clear now
@jonesleung61273 жыл бұрын
Incredible tutorial that just absolutely drove the concept right into my head, loved the explanation and the example - this made me have that light bulb moment where I was like "oh wow, so this is what it's all about!"
@RahulGupta-ly2uu6 жыл бұрын
sir u stopped giving the quiz questions at the end of the video.
@sufiyanmogal15272 жыл бұрын
thank you so much sir great explanation
@mypotm4 жыл бұрын
His video is crystal clear to me, only because I came from Java background. The main method being the point of execution , and the need to create a function in the main file to prevent unwanted access to the main file by other files But to the Python background users, I do not think this is clear enough for them. Because I learnt python before Java and I did not understand it before, only understand it after I learnt Java
@plabonkumersarker3 жыл бұрын
I understand it now! Thank you genius! You explanation is so cool ❤️
@tumul14744 жыл бұрын
wow man ! you make things crystal clear
@dishankshah50806 жыл бұрын
Getting confuse.make one more video on __name__.
@rajagladson44775 жыл бұрын
Yes bro
@tushargoyaliit5 жыл бұрын
@@rajagladson4477 exactly
@pokemongo83175 жыл бұрын
One more clear video sir
@rajeshraut29555 жыл бұрын
Yes so confusing
@pokemongo83175 жыл бұрын
Haha...don't hurry follow the playlist he already made another clearly
@parikshithishiker38803 жыл бұрын
Thank You for all the efforts that you've made to make this video. This is a very helpful and informative video and I was able tot understand everything clearly. It also helped me perform better in school.
@glenfernandes8982 жыл бұрын
Your explained this concept in a very simple manner
@jagrutnimmala60872 жыл бұрын
This video is very clear. Thank you so much Naveen. You are helping a lot of guys like me. Thanks
@lucifercoxi83243 жыл бұрын
just randomly found ___name___ == "__main__" , now got know the use, sir u made it easy peasy😀
@stealmil8 ай бұрын
i dont find it in this video wtf you say bruh ?
@mnk4utube3 жыл бұрын
Sir, its understandable, no need of new video on this topic. I too was bit confused initially but watched again, understood. One can try last minute program n understand. If name is main, then only execute main otherwise if its imported as a library in second module, then main function will not be executed ... that's it... :)
@legend78904 жыл бұрын
It was confusing at first so I had to watch it multiple times to understand. Understood the concept, thanks
@tinajain72952 жыл бұрын
The videos are very helpful and informative videos sir and that is the only reason I could learn python in this efficient way.Thank You sir.
@b.sasikumar21414 жыл бұрын
I'm enhancing by watching one by one video sir that's really great explaining....👍👍
@AliRaza-dq3gc5 жыл бұрын
Hello this video was very helpful im not confused at all! Also i figured out the problem thanks :)
@adarshmelodies4 жыл бұрын
In short.... __name__ gives name of file it is in ("calc", "utils" etc....) except, when it is in the file which is being executed first, it gives "__main__" instead. we can use this property to our advantage to customize few lines to execute only if it is executing first.
@ernestogarcia57622 жыл бұрын
Very clear and direct, thank you
@more_u-listen_more_u_love95436 жыл бұрын
Hello Sir, This is my main function ( demo.py)................................ class Computer: def __init__(self, name, age): self.name = name #Assigne the value to the object self.age = age def myfunc(self): print("Hello my name is and age is ", self.name,self.age) p1 = Computer("John", 36) p2= Computer("Soumen",25) p1.myfunc() p2.myfunc() if __name__== "__myfunc__": myfunc() This my cal function........................................ import demo print("This my first code which I wrote") if I call the cal function then why its print the demo.py result also ?
@manjunathmaddala72464 жыл бұрын
Bro first of all your code is wrong you are calling p1.myfunc( ) anf p2.myfunc( ) out side the condition and how can expect it not to print them in your cal module. So keep those p1.myfun and p2.myfunc in the if condition, the your code will work properly.
@preethamm.n11615 жыл бұрын
💞💞💞💓Awesome sir Ur my inspiration my hero 👏👏👏🌹🇮🇳🌟
@harisht465 жыл бұрын
It's been 3 days since I was trying to understand this concept but I'am getting confused. This is the first concept where I felt really hard to understand so far during my python course.
@53Strat3 жыл бұрын
Could not comprehend this from my book. Thanks for the explanation!
@Imran200919902 жыл бұрын
Watching 3rd time.. got the concept.. awesome.. thanks....
@iamniks4 жыл бұрын
i totally understand the use of __name__ , don't know why some people can't understand this easy concept
@qc75115 жыл бұрын
OOfff man, you saved me. Thank you so much for your video, this was really useful for me ! I'm now suscribed.
@shritishaw75103 жыл бұрын
beautifully delivered... thanks a lot
@vivekmishra17032 жыл бұрын
very helpful video
@amberpradhan24843 жыл бұрын
You are excellent sir ! Thanks alot!
@srimanikandaprasaths25223 жыл бұрын
This Man is awesome...Thank you for your good work. as simple as that...
@Jarrod_C4 жыл бұрын
I wish you had more use cases for why this is useful and how it is used with more examples.
@Dileep-bb3uq5 жыл бұрын
i understood that __name__ variable is used to prevent the leakage(i.e avoiding direct execution when we import) of code from the file which we are importing to another file
@ram543213 жыл бұрын
great video
@akshaybagalkotkar78333 жыл бұрын
Understood perfectly
@mnk4utube3 жыл бұрын
I watched other youtube videos too on this topic, trust me, no one can make you understand better than our Naveen sir... :) Hats off to you sir... Just ignore negative people's comments and keep teaching your loving "Aliens" :)
@Md_hassan636 Жыл бұрын
I don't know whether you will ever read this comment or not. but you are great bro i'm watching your video 4 years later after you have uplode
@Alberta_Farmer2 жыл бұрын
Amazing as always!
@vishalpatil79944 жыл бұрын
thank you sir ps: where ever you are not getting things by searching on goole append one more things to the search string navin reddy or tulusko you will definately understand the things if sir have recorded video on that
@kr.jay20946 жыл бұрын
awesome trick
@sakshipoojary20004 жыл бұрын
Iam watching python videos because of you sir
@flamboyantperson59366 жыл бұрын
I did not understand anything in this video. It was very confusing I went to sleep really. All other videos are awesome and I have liked each and every video except this. Please clear this concept again. Thank you.
@GOWTHAMKANYADHARA2 ай бұрын
Slow down the video speed to 0.5x speed and skip back repeatedly if you don't understand anything coming out from his mouth. Use Pycharm and experiment it with his tutorial. Then you will understand.
@juanbravo53155 жыл бұрын
Clear as always! thanks you for this kind of content :)
@Ilovequran1054 жыл бұрын
You are a SAVIOR !!!! Whenever i dont understand something i come to your videos !!
@namanvijay35144 жыл бұрын
superp explaination
@hydaromar65324 жыл бұрын
Mashallah great video.
@mr.student58054 жыл бұрын
Radhe radhe
@mdahanaf6 жыл бұрын
you are such a great teacher . respect you sir
@054_ritesh34 жыл бұрын
Very sharp
@amandeepsaha2 жыл бұрын
It was helpful sir Thankyou
@GraphicalBoss2 жыл бұрын
Great way to explain it! I watch like 2 videos before this one and I was more confused than when I started. lol Thank you sir. Bravo
@prasannabiswas27276 жыл бұрын
This is the only place I understood the special variable.
@simondolapo15672 жыл бұрын
Placed my two hands on my heads and shouted "wow"
@learnMore01234 Жыл бұрын
provide all lecture Hindi also
@EUCitizenFedUpWithAllThisCrap3 жыл бұрын
Great explination!
@vakhariyajay22242 жыл бұрын
Thank you very much. You are a genius.
@sam.mankar4 жыл бұрын
Sir I enjoyed the video and understood the concept at first sight(I just needed to practice on my laptop) . Crystal clear
@cdevagiri3 жыл бұрын
Thank you so much. Very clearly explained
@robinrai3415 жыл бұрын
thank u so much sir,, i am impressed your teaching style,,, plz sir can u make a tutorial for django python
@prem94694 жыл бұрын
sir as usual loved ur videos, but sir give us assignment questions or mini projects so that we can improve more
@kenjik60293 жыл бұрын
You are awesome thanks
@asishraz61734 жыл бұрын
Understood it very nicely and experimented in many ways. Great video sir. Feeling motivated and going to watch next video.
@gautamgovinda51403 жыл бұрын
nice explation
@khalifa20802 жыл бұрын
Thank you from Pakistan
@madhuks90534 жыл бұрын
even my teachers can't teach in this way very good ...
@MsHumayun1234 жыл бұрын
Navin bro I luv you...you changed my life😊👍
@0xN1nja3 жыл бұрын
you explained better than codewithharry
@anirbanc882 жыл бұрын
this was awesome!
@rajkapadia2476 жыл бұрын
Amazing content man. Keep up the good work.
@sunilkumarreddy65375 жыл бұрын
hello sir i'am getting some confuse pls guide me this lecture, Thank you........
@bsmaheshkumar53284 жыл бұрын
It is the damn clear explanation... Thank you, sir.
@AnilKumar-ss5qz4 жыл бұрын
Super explanation
@nikhilnambiar68113 жыл бұрын
Bro you r awesome... 🤩🤩🤩🤩.. I like you way of explanation ❤️...
@sambit982 жыл бұрын
Mind = Blown
@Squash1013 ай бұрын
This isn't really all that confusing, simply a bit of time to think about it. In essence, when ever you run a file with _name_ it will print out _main_ since the file you're running is the ''main', but when _name_ is called from within a different file with import then it print out the name of the file every time. to stop the name of the file and code within the import file from being printed printed we simply put a conditional saying if _name_ = "_main_" then allow for the execution of the functions within so the import file never runs on your main file.
@amaansiddiqui89474 жыл бұрын
I didn't understand why people are not able to understand the crystal clear logic.
@chetansoni86204 жыл бұрын
thanks for explaining sir....
@Schdid3 жыл бұрын
still very useful today thank you
@kirubababu71273 жыл бұрын
You are Awesome 🔥
@ImJhon-jr5tn4 жыл бұрын
A mystery man ❤ great man 🤝
@faiyaz76974 жыл бұрын
Sir, would you please be able to go through every video of yours in this Python series and wherever you have mentioned that you will about this(that particular thing/topic) later, would be able to make videos on that topics about which you said that you will talk about it later and include them in this series ?
@mohdimrankhan32934 жыл бұрын
you are awesome
@smdash29203 жыл бұрын
I think what people miss is... The fact that how YOU ENTER INTO THE PROGRAM! for the people this isn't making sense need to understand, the entry into your program. In other languages, the concept is a bit different yet the idea is same
@jadia5 жыл бұрын
I had to watch this video 3-4 times to understand but at last I understood. :)
@keshavrao37515 жыл бұрын
YOu are awesome but very fast and very simple examples
@simpleandeasy72892 жыл бұрын
TQ so much sir
@SumitSinghzz3 жыл бұрын
Sir when you said welcome back 'aliens' it feels main dusre brhamand se aaya hun😁
@chinmaydas40536 жыл бұрын
Sir we did not get videos in last few days due to your illness.. Sir you be always in good health.. Our prayers for you to God.. 🙏🙏🙏..