ok, I'm sure the answer to this is very simple.. there may even be some component in the os package to do this... I want to do what the code underneath seems like it would do.. I understand it does not, and when I try to run the code, I get an error saying that variable is not a class or w.e.. but I want to run the function whose name is given by 'variable'. Is there like os.execute(variable) or something obvious like that? or maybe in the testF function, I add func = class(testF) or something similar.. I gotta know..
variable = 'testF' def testF(): print('Hello World!') def reflect(what): what() def main() reflect(variable) main()
Edited by FALL3N: n/a