I’m self-learning python and got a problem with a function.
… def__init__(self, id, age, sex)
… self.id = id
… self.age = age
… self.sex = sex
Traceback (most recent call last):
File “”, line 1, in
File “”, line 2, in student
NameError: name ‘def__init__’ is not defined
The program misinterprets it as a name. Do I need to import a module to activate the function? How can I debug this?
This may be a silly question but I really dun know why this is happening.