eval() in python

Benji York benji at benjiyork.com
Tue Jun 21 08:36:15 EDT 2005


harold fellermann wrote:
>  >>> s="print 'hello Xah Lee :-)'"
>  >>> exec(s)
> hello Xah Lee :-)

Note that because "exec" is a statement, the parentheses above are 
superfluous.
--
Benji York



More information about the Python-list mailing list