welcome to Bytes
Bytes Easy way to learn Python in Tamil
Bytes Python Tutorial
_name_ (A Special variable) in Python Since there is no main() function in Python,
when the command to run a python program is given to the interpreter,
the code that is at level 0 indentation is to be executed.
However, before doing that, it will define a few special variables.
_name_ is one such special variable.
If the source file is executed as the main program, the interpreter sets the _name_ variable to have a value “__main__”.
If this file is being imported from another module, _name_ will be set to the module’s name.
_name_ is a built-in variable which evaluates to the name of the current module.
On this page of the site you can watch the video online if __name__ == __'main'__ : | Name Variable in Python | Python Tutorial for Beginners with a duration of hours minute second in good quality, which was uploaded by the user Bytes 10 November 2018, share the link with friends and acquaintances, this video has already been watched 651 times on youtube and it was liked by 27 viewers. Enjoy your viewing!