class ExFunc:
@classmethod
def exFunc(cls):
print("exFunc has worked")
func = exFunc
funcs = [exFunc]
ExFunc.funcs[0]()
and i get TypeError: 'classmethod' object is not callable error in ExFunc.funcs0 line. I have some other functions in original code so i want to add them into a list and call them from list according to the input of the user. How can i do it?
I printed the ExFunc.funcs[0] code and it says its a classmethod and i tried to add () at its end because i thought i normally call functions when i put () at the end but it didnt work.