I want to read in a file that contains a variable name that is defined in my code i.e. (Variable1 = 5 and Variable2 = 6).
For example, my file may look something like this:
Variable1
Variable2
I can read those names into a list (lets call it input_list)
Now I want to use the value of that variable in another function ie:
add(input_list[0], input_list[1])
However, it is reading the input as strings Variable1 and Variable2, but I want it to read in the values as ints of 5 and 6)
I know this sounds confusing, but hopefully someone can understand what I am trying to do (if it is even possible)