Trying to start learning python and having the following problem:
$ python Python 3.2.2 (default, Nov 21 2011, 16:50:59) [GCC 4.6.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world" File "<stdin>", line 1 print "hello world" ^ SyntaxError: invalid syntax >>>
The same happens if I run /usr/bin/python3 instead of the symlink.
Searching the forum for this problem was not succesfull, therefore I would like to ask for help to fix this.
Last edited by sipik (2012-02-20 12:53:59)
use python2 instead of python, which is python 3.x . There are some syntax changes between python 2.x and 3.x
ok i must have started with a python2 tutorial... sorry for my ignorance
thanks a lot!
Wrong forum. Moved to Programming & Scripting.
To know or not to know ...
... the questions remain forever.
print ("Hello Arch Linux") will do the trick in 3x