A review:
Two global variables (including functions and classes):
(1) Normal variable x:
* Can be used via module.x.
* Can be used with the From module import *.
(2) Start with "_" Variable x:
* Can be used via module.x.
* cannot be used through the From module import *.
* Can be used with the From module import x.
(3) Start with "__":
* Can be used via module.x.
* cannot be used through the From module import *.
* Can be used with the From module import x.
(4) "__all__" variable:
*from Module Import *, only the variables defined in __all__ are imported.
* If you put the _ start variable into __all__, it will be imported.
Variables in three categories:
(1) Variable of class :
* Double underscore (__) variables and functions represent private variables and methods of a class, and can only be called within a class method. Note: Do not write the double underline in the back.
* But a single underline can still be called, and a single underline is only a convention.
(2) The variable of the instance:
* Variables of the same type.
Variable naming in Python