implementation of classwe can mark the method as private it is not recommended to access private method outside the class but if neededwe can access private method outside the class as followsobjectname _classname__privatemethod(arg arg if neededwe can access private variables using similar syntax as above following example demonstrates private methodclass boxdef __init__(selflb)self length self breadth #private method def __printdetails(self)print("length of box is:"self lengthprint("breadth of box is:"self breadthdef display(self)self __printdetails( box( , display(#recommended _box__printdetails(#not recommended built-in functions following are some of the built-in functions to work with objectsfunction description hasattr(objnamethis function checks whether the specified attribute belongs to the object or not getattr(objname[,default]this function retrieves the value of the attribute on an object if the default value is given it returns the that if no attribute is present otherwisethis function raises an exception setattr(objvaluethis function is used to set the value of an attribute on given object namedelattr(objnamethis function deletes an attribute on the given object built-in class attributes every class in python by default has some attributes those attributes can be accessed using dot operator these attributes are as follows