+ 2

Please explain me?

class Myclass: def __init__(self,a=0,b=1): self.a=a self.b=b @classmethod def value_ax10(cls, value): return cls(value*10) Obj=Myclass (1,2). value_ax10(3) print (Obj.a,Obj.b) Ans==>30,0 How we get this Ans?

1st Jun 2020, 1:45 AM
Aaditya Tailor
Aaditya Tailor - avatar
1 Odpowiedź
- 3
What are you don't understand?
1st Jun 2020, 1:48 AM
Emanuel Maliaño
Emanuel Maliaño - avatar