Invalid syntax with print "Hello World"

Daniel Fetchinson fetchinson at googlemail.com
Thu Mar 12 08:24:06 CET 2009


> obviously total mewbiew:
>
> My first program in Python Windows
>
> print "Hello World"
>
> I select Run/Run Module and get an error:
>
> Syntax error, with the closing quote highlighted.
>
> Tried with single quotes as well. Same problem.
>
> Can someone explain my mistake?

Are you using python 3.0? In this case please see:

http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function

HTH,
Daniel



-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list