int = input('请输入要导入的模块名:') # print(type(int)) int1 = input('请输入要使用的函数名:') dd = __import__(int,fromlist=True) # print(ret,type(ret)) print(getattr(dd,int1)())
int = input('请输入要导入的模块名:') # print(type(int)) int1 = input('请输入要使用的函数名:') dd = __import__(int,fromlist=True) # print(ret,type(ret)) print(getattr(dd,int1)())