I have restructured one of my projects so that it is more elegant and readable. I arrived at a point where I want to apply a multivariate function, thus transforming the value of the variable. To my dismay, I realized that the loop for that I was using did not change the value of the variables.
def change_value (x): x = x * 2 back x a = 5 b = 10 c = 15 for x in (a, b, c): x = change_value (x) print (a) #a does not really change.
The reason I want to do this is because I have created several datasets and a method that is reshaping them. Rather than explicitly passing each variable through the function on its own line, I would like to find a way to iterate.