[Tutor] Can't even get hello to work???!!

Alan Gauld alan.gauld at btinternet.com
Wed Dec 15 18:56:35 CET 2010

"Khalid Akram" <KAkram at 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.


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

More information about the Tutor mailing list