Programming, Python.
self.__lastname = 'Dube' def PrintName(self): return self.name +' ' + self.__lastname #Outside class P = Person() print(P.name) print(P.PrintName()) print(P.__lastname) #AttributeError: 'Person' object has no attribute '__lastname' Note The __init__ method is a constructor and runs as soon as an