出现 Student() takes no arguments)错误
Traceback (most recent call last):
File “E:/test/self语句的使用.py”, line 8, in
s1 = Student(‘张三’,18)
TypeError: Student() takes no arguments
问题解决的方法:def init(self,x,y)是否写成了 def _ init_(self,x,y)
PS: init,左右两边应该是各两道下滑线,而不是一道