who can access my datamost object-oriented programming languages have concept of access control this is related to abstraction some attributes and methods on an object are marked privatemeaning only that object can access them others are marked protectedmeaning only that class and any subclasses have access the rest are publicmeaning any other object is allowed to access them python doesn' do this python doesn' really believe in enforcing laws that might someday get in your way insteadit provides unenforced guidelines and best practices technicallyall methods and attributes on class are publicly available if we want to suggest that method should not be used publiclywe can put note in docstrings indicating that the method is meant for internal use only (preferablywith an explanation of how the public-facing api works!by conventionwe should also prefix an attribute or method with an underscore character_ python programmers will interpret this as "this is an internal variablethink three times before accessing it directlybut there is nothing inside the interpreter to stop them from accessing it if they think it is in their best interest to do so because if they think sowhy should we stop themwe may not have any idea what future uses our classes may be put to there' another thing you can do to strongly suggest that outside objects don' access property or methodprefix it with double underscore__ this will perform name mangling on the attribute in question this basically means that the method can still be called by outside objects if they really want to do itbut it requires extra work and is strong indicator that you demand that your attribute remains private for exampleclass secretstring''' not-at-all secure way to store secret string ''def __init__(selfplain_stringpass_phrase)self __plain_string plain_string self __pass_phrase pass_phrase def decrypt(selfpass_phrase)'''only show the string if the pass_phrase is correct ''if pass_phrase =self __pass_phrasereturn self __plain_string elsereturn '