A simple (newbie) question.
wolfgang.grafen at marconi.com
Wed Feb 21 17:35:38 CET 2001
following should work:
>>> c=b+' '+a
"David A." wrote:
> Hello to everyone,
> maybe I have already sent this question to the group, but I am not sure
> (the first one never reached the group I think). Anyway, I am a newbie, so
> probably my question is a realy simple for the most experienced python
> Well what I want to is this:
> >>> a='python'
> >>> b='print'
> >>> c=b+a
> >>> eval(c)
> Traceback (innermost last):
> File "<pyshell#19>", line 1, in ?
> File "<string>", line 1
> SyntaxError: invalid syntax
> Of course, what I wanted was that the eval(c) prints "python"!
> what am I doing wrong? Any help is apreciated.
> Thx in advance David Asfaha.
> "Quidquid latine dictum sit, altum viditur."
> Whatever is said in Latin sounds profound.
More information about the Python-list