a question from a newcomer to this language

Shankar Iyer (siyer@Princeton.EDU) siyer at Princeton.EDU
Fri Jun 10 21:36:54 CEST 2005


I am a undergraduate physics student, and I have been asked to write some code in Python for my summer job.  Over the past few days, I have been learning Python and Tkinter, so naturally, I have several questions about the language.  Here's one:

Is there any way to convert a string into an instruction that will be executed?  For example, suppose there's a string sString = "z = x*y".  Is there any way to have the instruction z = x*y be executed by performing some operation on sString?

Thanks in advance for your help.


More information about the Python-list mailing list