Posts
Showing posts from September, 2007
python 3000 breaks hello world
- Get link
- X
- Other Apps
$ ./python Python 3.0a1 (py3k, Sep 1 2007, 14:48:21) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world" File " ", line 1 print "hello world" ^ SyntaxError: invalid syntax Weird. I've been trying to learn this python programming language, but the first command in my lecture notes, the three textbooks I have, and all the online tutorials seem to be wrong. Anyone know how to get hello world working? Update: oh it seems that print is a function. ---> ;) Maybe it should show this in the shell, kind of like what typing help does: >>> help Type help() for interactive help, or help(object) for help about object. >>>print 'hello world' Type print('hello world') to print a string, or print(object) to print an object. Has any other major progra