Python print Codecademy IDLE discrepancy?

python

#1



My code in Python behaves perfectly. The only problem is that in the IDLE for Python I had downloaded, the first example is how print is used, but in Codecademy, the second example is used.

I'm sure there is a reason, I was just wondering why this happens.


print("Hello World!")
print "Hello World!"


#2

CC is still implementing Python 2.7.x in the old courseware and the labs. IDLE for Python 3.5 will differ slightly, the above example being one of those immediately apparent differences. Happily, we can write print statements either way in 2.7.x so go ahead and keep up the practice of writing 3.5 style print statements so you form the habit. In only the rarest of cases (none I know of) will the SCT not accept the newer print syntax.