Yet Another Newbie Question (YANQ)
Oleg Broytmann
phd at phd.pp.ru
Mon Feb 19 06:31:08 EST 2001
On Sat, 17 Feb 2001, David A. wrote:
> >>> a='a'
> >>> prt='print'
> >>> t=prt+' '+a
> >>> t
> 'print a'
>
> now when I try to:
> >>> eval(t)
> Traceback (innermost last):
> File "<pyshell#18>", line 1, in ?
> eval(t)
> File "<string>", line 1
> print a
> ^
> SyntaxError: invalid syntax
exec t
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list