0
Class
what i have to do if i want to add new function in class exampl: class a: def f(self): print('x') i want add : def run(y): n= y+y return n should be: class a: def f(self): print('x') def run(self,y): n= y+y return n
6 odpowiedzi
+ 1
ok. thank you
0
if i have some classes?
0
exampl:
class a:
def g(self):
print(True)
class b:
def r(self):
print('hi')
i want to add to class b new function:
def f():
print (False)
0
There is no other option?
0
nothig. that all
0
I just wanted to add a function