In article 
<2ab25f69-6017-42a6-a7ef-c71bc2ee8...@l2g2000vbn.googlegroups.com>,
 noydb <jenn.du...@gmail.com> wrote:

> How would you convert a list of strings into a list of variables using
> the same name of the strings?
> 
> So, ["red", "one", "maple"] into [red, one, maple]
> 
> Thanks for any help!

I'm not sure what you're trying to do, but explore the dictionary 
returned by locals().  You can do something like:

loc = locals()
[loc["red"], loc["one"], loc["maple"]]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to