Invalid syntax with print "Hello World"

Daniel Fetchinson fetchinson at googlemail.com
Thu Mar 12 03:24:06 EDT 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