I was wondering if such a construction was possible in Python :
class A():
def method1(self):
print ('method 1')
def method2(self):
print ('method 2')
a = A()
call_method(a, 'method1')
call_method(a, 'method2')
Expected result : method 1 method 2
How to define call_method
?
Thanks in advance