1# convention: _<name> for protected and __<name> for private
2class MyClass:
3 def __init__(self):
4
5 # Protected
6 # No access outside of the class or subclasses
7 self._this_is_protected = True
8 # Private
9 # No access outside of the class
10 self.__this_is_private = True
11
12# Note:
13# Private and protected members can be accessed outside of the class using python name mangling.