I know this question is extremely trivial, but I have not been able to find a clean and easy solution to my problem. I would like to know how to get a variable value and not variable name when variable is referred to as a string:
VARIABLES = ['T1', 'T2']
T1 = "&AB="
T2 = "&PD="
print(VARIABLES[0])
T1
Where I actually want it to print "&AB="
I know in above case the easy solution would be to have VARIABLES list defined as [T1, T2] but that is not a working solution for my specific problem. As the true working example is more complex.
I tried solutions with global() statements but these get very convoluted fast.