String as a Variable?

Oleg Broytmann phd at phd.pp.ru
Fri Feb 2 10:57:01 EST 2001


On Fri, 2 Feb 2001 binnc at my-deja.com wrote:
> Is there a way to have a string represent a variable.

   Although there are ways to do it, the recommnded way is to awoid it at
all. Better, collect all neccessary variables in a dictionary:

   x = mydict["ip_addr_" + value]

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list