Is it possible to use a string to call a method?
Say I got a string x = txt (which is a known file extension to my program) and I have a method called txt(value). When x changes to doc, is there a way to make my program call to doc(value)? I tried x(value) (which is a nonexistent method) and I get a string object not callable.
I hope I am clear enough about it. Thanks :].
Say I got a string x = txt (which is a known file extension to my program) and I have a method called txt(value). When x changes to doc, is there a way to make my program call to doc(value)? I tried x(value) (which is a nonexistent method) and I get a string object not callable.
I hope I am clear enough about it. Thanks :].
Comment