[Tutor] Can't print a string, gives me syntax error

xbmuncher xboxmuncher at gmail.com
Mon May 25 19:48:43 CEST 2009


I ran this in IDLE:
>>> t = 'hi'
>>> print t
SyntaxError: invalid syntax (<pyshell#3>, line 1)

I've also tried this as sample.py :
import string
text = 'hello world'
print text


It gives me a syntax error on "print text" line

What's going on?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090525/2d0bee89/attachment.htm>


More information about the Tutor mailing list