"Khalid Akram" <kak...@efinancialcareers.com> wrote

I'm using Python 3.1.3 on Windows XP (using Python Shell).
This is what I am trying:

print 'hello'
...
SyntaxError: invalid syntax

What could possibly be wrong?

You are using a Python v3 interpreter but a Python v2 tutorial.
Python v3 has several new features which are not backward compatible with v2.

Try

print( 'hello' )

You can either downgrade Python to v2 and follow your tutorial
or find a v3 tutorial. (If you can already program just use the official
one on the Python web site or if you are a new programmer you
might like to try mine :-)

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to