__name__ variable
Used to determine if the Python file is running as the main program. If the file is imported, the __NAME__ value is its file name, and if the main program, its value is __main__
This is why it is often seen that there are some Python files that have if __name__ = = ' __main__ ' in order to prevent the import of the main program inside the file also run.
__all__ variable
Defines a common interface for a template, such as from OS Import * This means that you can only take advantage of the functions in the __all__ variable, such as the __all__ variable, because there may be a lot of functions, variables and classes that you don't need or want in the template, __all__ Will filter them out. If you do not set the __all__ variable, the import * statement defaults to all global names that do not begin with the underscore.
__doc__ variable
Get a document explanation for a module or function
__file__ variable
The path of the source program (source code) of the module is obtained, and the other method is to find it by Sys.path.
Python3 learning the Eighth bullet: module Learning one module variable