String as a Variable?

Mikael Olofsson mikael at isy.liu.se
Fri Feb 2 11:05:04 EST 2001


On 02-Feb-01 binnc at my-deja.com wrote:
 >  Now I want to use the string ip_address_serial_3 to pull
 >  the value assigned to the variable of the same name.


>>> exec('a=0')
>>> a
0

HTH

/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    02-Feb-01
Time:    17:04:09

         /"\
         \ /     ASCII Ribbon Campaign
          X      Against HTML Mail
         / \

This message was sent by XF-Mail.
-----------------------------------------------------------------------



More information about the Python-list mailing list