what are getters and setters in python?
A getter is a method that gets the value of a property. In OOPs this helps to access private attributes from a class. A setter is a method that sets the value of a property. In OOPs this helps to set the value to private attributes in a class. Basically, using getters and setters ensures data encapsulation.