CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/Day01-15/code/Day08/access.py
Views: 729
1
class Test:
2
3
def __init__(self, foo):
4
self.__foo = foo
5
6
def __bar(self):
7
print(self.__foo)
8
print('__bar')
9
10
11
def main():
12
test = Test('hello')
13
test._Test__bar()
14
print(test._Test__foo)
15
16
17
if __name__ == "__main__":
18
main()
19
20