I've been restructuring a project of mine to be more elegant and legible. I've gotten to a point where I want to apply a function to several variables, thus transforming the value of the variable. To my dismay, I've realized that the for loop I was using did not change the value of the variables.
E.g:
def change_value(x):
x = x * 2
return x
a = 5
b = 10
c = 15
for x in (a,b,c):
x = change_value(x)
print(a) #a doesn't actually change.
The reason I want to do this is because I have created several data sets and a method which reshapes them. Rather than explicitly pass each variable through the function on its own line, I would like to find a way to iterate.