Print Function

John Gordon gordon at panix.com
Fri Sep 21 17:17:45 EDT 2012


In <db8c7111-8fc7-4884-8c58-987399f7793f at googlegroups.com> gengyangcai at gmail.com writes:

> I am currently using Python 3.2.3 . WHen I use the print function by
> typing print "Game Over" , it mentions  " SyntaxError : invalid syntax ".
> Any ideas on what the problem is and how to resolve it  ? Thanks a lot .

In python version 3, print was changed into a function.

Use this and it will work:

  print("Game Over")

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list