executing Python statements

Jeff no_spam at umich.edu
Mon Jul 24 16:41:57 EDT 2000


Hi, say I have a variable called 'x', and it is 100.  I have another
variable called 'run_this_string' and it reads 'print x'.  How can I then
execute run_this_string and get 100 to print out?  Here is a code snippet:

x = 100
run_this_string = 'print x'






More information about the Python-list mailing list