hello, i have a string variable that contains a name that I want to use as a variablenameputting aside questions of why I would like to do that - i this possible at all?so I want to assign a value to a variable whos name is available only as a string to me.
that variable does not exist yet in the
frank h. wrote:
hello, i have a string variable that contains a name that I want to
use as a variablename
putting aside questions of why I would like to do that - i this
possible at all?
so I want to assign a value to a variable whos name is available only
as a string to me.
that
By string variable that contains a name that I want to use as a
variablename do you mean something like this:
myString = rotationalSpeed
rotationalSpeed = 4500
??
In Python a dictionary is an excellent solution to this problem. The
only other way to accomplish this (to my knowledge) is in PHP
On 10/5/06, frank h. [EMAIL PROTECTED] wrote:
hello, i have a string variable that contains a name that I want to use as
a variablename
setattr() won't work because that's only for objects which have
attributes. you're talking about creating a (global or local)
variable. i will also