Print variable values by their names

Michael Krasnyk mkrasnyk at gmail.com
Mon Oct 18 19:03:26 CEST 2004


Hi,

How can I print variable values by their names?
For example:

import sys
for str in dir(sys): print str

Will be printed only variable names, but I need values from list of variable names.

Thanks in advance,
Michael



More information about the Python-list mailing list