[Tutor] Addressing a variable whose name is the value of a string

Andreas Pfrengle spelzdinkelclonk at web.de
Sun Apr 8 18:27:23 CEST 2007


I want to change the value of a variable whose name I don't know, but
this name is stored as a string in another variable, like:

x = 1
var = 'x'

Now I want to change the value of x, but address it via var. I'm quite
sure I've already seen a solution for this, but right now I don't get it :-(
Some help would be appreciated :-)

Thanks in advance,

More information about the Tutor mailing list