In previous versions of phyton 3 print used to be used like this:
Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hello World"
File "<stdin>", line 1
print "hello World"
^
SyntaxError: invalid syntax
>>> exit()
In Python 3.0, print became a function. You need to include parenthesis now.
print("Hello World")
Here is more information:
http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function
No comments:
Post a Comment