I have a program in which I'm trying to change a certain variable of a class depending on which one is designated earlier in the program. I want to know if I can indicate which variable I want to change by storing the variable name in another variable, is it possible?
Example:
class Vars:
first = 0
second = 0
variable_name = first
Vars.variable_name += 1
I want Vars.first to be equal to 1 after this code is executed, is this possible?