Answer:
When a Python script is running as a standalone program, the __name__ variable will be set to __main__.
Explanation:
Python does not have main( ) function like some other programming language. So, when a command is given the interpreter to execute a python program, the code that is indented least (that is level 0) is executed first.
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.