Answers for "how to change the name of a variable in a loop python"

0

how to change the name of a variable in a loop python

for i in range(3):
    locals()["group"+str(i)] = self.getGroup(selected, header+i)
Posted by: Guest on August-10-2021
0

how to change the name of a variable in a loop python

for i in group(3):
    setattr(self, "group"+str(i), self.getGroup(selected, header+i)
Posted by: Guest on August-10-2021

Code answers related to "how to change the name of a variable in a loop python"

Python Answers by Framework

Browse Popular Code Answers by Language