On Thu, Aug 18, 2011 at 5:09 PM, John Gordon <gor...@panix.com> wrote: > for x in list_of_strings: > list_of_variables.append(eval(x)) >
If this really is what you need, you can simplify it by using the globals() dictionary - it's a regular dictionary whose contents are all the global variables in your current module. Inside a function, use locals() instead. http://docs.python.org/library/functions.html#globals ChrisA -- http://mail.python.org/mailman/listinfo/python-list