Look at getattr() built-in function.
Note that with attribute name like method1, method2, etc. there is good chance you are doing something the wrong way. Better tell us what/why you are doing this and what's your code, i.e. instead of 40 methods 2 or 3 will be sufficient to demonstrate your case.
Note that with attribute name like method1, method2, etc. there is good chance you are doing something the wrong way. Better tell us what/why you are doing this and what's your code, i.e. instead of 40 methods 2 or 3 will be sufficient to demonstrate your case.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs