Yet Another Newbie Question (YANQ)
David A.
man_at_moon at hotmail.com
Sat Feb 17 02:51:01 EST 2001
Hi to everyone,
I am playing around with python and I have 1 quetions where I hope
someone can help
I have this problem:
>>> 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
can someone explain me what I am doing wrong! Why can't I use eval(print)?
Any help is welcome!
David Asfaha
--
"Quidquid latine dictum sit, altum viditur."
Whatever is said in Latin sounds profound.
More information about the Python-list
mailing list