Почему следующий код конструктора Python выдает мне ошибку?Python

Программы на Python
Anonymous
Почему следующий код конструктора Python выдает мне ошибку?

Сообщение Anonymous »


class Student: college = 'usa' name = 'rahul' #error message ? def __init__(self): print('new Student is entered ...') #para cons def __init__(self, name): self.name = name a = Student() Please check what mistake i did in above code


Источник: https://stackoverflow.com/questions/781 ... -and-error

Вернуться в «Python»