J
John Abel
Hi,
I have a list of variables, which I am iterating over. I need to set
the value of each variable. My code looks like:
varList = [ varOne, varTwo, varThree, varFour ]
for indivVar in varList:
indivVar = returnVarFromFunction()
However, none of the variables in the list are being set. I thought of
using setattr, but this code sits in a function, and not class, so I'm
unsure what the object would be.
I'm hoping someone can point me in the right direction.
John
I have a list of variables, which I am iterating over. I need to set
the value of each variable. My code looks like:
varList = [ varOne, varTwo, varThree, varFour ]
for indivVar in varList:
indivVar = returnVarFromFunction()
However, none of the variables in the list are being set. I thought of
using setattr, but this code sits in a function, and not class, so I'm
unsure what the object would be.
I'm hoping someone can point me in the right direction.
John