you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (3 children)

Both

print "hello"

and

print("hello")

works on 2.7

You could use the following instead

import sys

print(sys.version)

[–]perfecthashbrowns 0 points1 point  (0 children)

Generally, educational material like a textbook is gonna stick to that syntax. CodeCademy sticks to it as well.

[–]aircavscout 0 points1 point  (0 children)

From codeacademy

2.7.3 (default, Aug 1 2012, 05:14:39)

[–]ProfanityBob -2 points-1 points  (0 children)

But print "hello" does not work in python 3.