0
How to solve : "TypeError: __init__() missing 1 required positional argument"
class Employee: def __init__(self, name): self.name = name def emp_dtl(self): self.name = 'XYZ' def disp_emp_dtl(self): print(self.name) employee = Employee() employee.disp_emp_dtl
1 Answer
+ 4
You need to pass a value to Employee()
employee = Employee("George")
You have a positional parameter name that needs an argument passed for it.