1. Help Center
  2. Python Programming

What Is the Output Of: Print(__name__)?

__name__ is a special variable that holds the name of the current module. Program execution starts from main or code with 0 indentations. Thus, __name__ has a value __main__ in the above case. If the file is imported from another module, __name__ holds the name of this module.