On Mon, May 25, 2009 at 6:46 PM, phpfood <[email protected]> wrote:

> 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?
>

Are you running python3? If so,  it should be:

>>> print(t)

print changed to a function in python3. If you're just starting to learn
python, it will probably be easier if you stick to the 2.X series until you
get comfortable.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to