loial wrote:
> I need to store a list of variable names in a dictionary or list. I
> then later need to retrieve the names of the variables and get the
> values from the named variables. The named variables will already have
> been created and given a value.
> 
> I hope thats clear!!!
> 
> How can I do this?
> 
Use a dictionary.  Example:

var1=10
var2="abc"
var2=1.2

vardict['var1']=var1
vardict['var2']=var2
vardict['var3']=var3

print vardict['var1']
print vardict['var2']
print vardict['var3']

-Larry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to