If I have a file called input_file.py
and I want to import some variables into another script I use the following:
from input_file import (VarA, VarB, VarC)
If I wanted to have the file name itself be a variable which I could easily switch how would I do it? As an example:
file_name = 'input_file'
from file_name import (VarA, VarB, VarC)