Join 36000+ teachers and students using TTIO.
Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.
This concept is also often used to hide the internal representation, or state, of an object from the outside. This is called information hiding. The general idea of this mechanism is simple. If you have an attribute that is not visible from the outside of an object, and bundle it with methods that provide read or write access to it, then you can hide specific information and control access to the internal state of the object.
https://pythonspot.com/encapsulation/
https://www.geeksforgeeks.org/encapsulation-in-python/
https://pythonprogramminglanguage.com/encapsulation/
https://techwithtim.net/tutorials/python-programming/classes-objects-in-python/creating-classes/
www.teachyourselfpython.com