Python is a very dynamic language, which makes it difficult for the interpreter to enforce some of the safeguards that languages like Go do. That's why encapsulation in Python is achieved mostly by convention rather than by force.
Prefixing methods and properties with a double underscore is a strong suggestion to the users of your class that they shouldn't be touching that stuff. If a developer wants to break convention, there are ways to get around the double underscore rule.
class Wall:
def __init__(self, height):
# the double underscore makes this a private property
# but it's not strictly enforced, there are hacks to get around it
self.__height = height
def get_height(self):
return self.__height