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
548k questions
547k answers
4 comments
86.3k users