table of Contents
@
1. Description
__A (private): used only within the class object uses, but does not allow subclasses, other packages not be imported into
a (protected): may be used in a subclass can be accessed through the object, can not import other packages
A : did not ask, is the difference between their definition of the name only
2. Code
test.py
a = 1
a_ = 1
__a = 1
_a = 1
main.py
from test import *
import test
print(a)
print(a_)
print(test._a)
print(test.__a)
print(_a)
print(__a)
#输出前四个1
About the Author
Personal blog site
personal GitHub address
individual public number: