if __name__ == __'main'__ : | Name Variable in Python | Python Tutorial for Beginners

Publicado el: 10 noviembre 2018
en el canal de: Bytes
651
27

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.


En esta página del sitio puede ver el video en línea if __name__ == __'main'__ : | Name Variable in Python | Python Tutorial for Beginners de Duración hora minuto segunda en buena calidad , que subió el usuario Bytes 10 noviembre 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 651 veces y le gustó 27 a los espectadores. Disfruta viendo!