+ 1
In the second code why the error is occurs?
code is in the below link https://code.sololearn.com/c9F9It3wRlc7/?ref=app
2 ответов
+ 1
But MyClass it self is become an object while defining the MyClass then
why should you used"MyClass()" ?
+ 1
This solution works:
class MyClass:
a = 10
@classmethod
def func(self):
return 'hello'