variable variables
pyth at relax.dk
pyth at relax.dk
Mon Dec 11 05:34:59 EST 2000
> I guess you want to be able to have multiple references to the same
> variable, and that you want to be able to change the value of that
> variable in such a way that all references refer to the same new value.
> /Mikael
Sorry Mikael, for using your time... I should have been more specific...
What i was thinking of, was something like this:
test1 = 'test text 1';
test2 = 'test text 2';
var1 = 1
var2 = 2
print test{var1};
This should print: 'test text 1'
This example doesn't work, but is close how you would do it in php :o)
Thanx for tryin' Mikael :o)
/Dan Larsen
More information about the Python-list
mailing list