You can use the importlib module.
importlib
Import using the importlib.import_module(name, package=None) function like this
importlib.import_module(name, package=None)
import importlib module_name = importlib.import_module('module-name')
Then use module_name to access it.
module_name
2.1m questions
2.1m answers
60 comments
57.0k users