Is it possible to call modules and functions with user input in Python?
For example:
a = input("Module: ")
import a
b = input("Function: ")
a.b()
Is it possible to call modules and functions with user input in Python?
For example:
a = input("Module: ")
import a
b = input("Function: ")
a.b()
you could use
eval(f'import {a}')
eval(f'{a}.{b}')
but I higly recommend you not to just eval random user input.