classPerson:def__init__(self,firstName,lastName): #constructor self.firstName = firstName self.lastName = lastNamedef__repr__(self): #how it is printedreturn self.firstName +" "+ self.lastNamedef__del__(self): #run when last reference to it goes out of scopeprint self.id,'died'classEmployee(Person):def__init__(self,firstName,lastName,weekly_salary):super().__init__(firstName, lastName) self.weekly_salary = weekly_salarydefcalculate_payroll(self):return self.weekly_salary
No private variables, self._x just indicates private not enforced