What version of python am i using?


#1

Hi all

i am really enjoying learning Python on codecademy. however i have one question. every time i learn someting new i try it out on a version of python i have on my computer and it never seems to work. it always says the syntax is wrong or that i am missing parentthesis..... any ideas where im going wrong?

many thanks


#2

It seems, that you're using Python 3.x, where to use "print" you have to use parenthesis, like this:
print ("Hello World!")
And on CodeCademy they use Python 2.x syntax, where
print "Hello World!"
is ok.
I'm puzzled myself why do they use Python 2.x syntax. It was substituted by Python 3.x in 2008.
Maybe becouse 2.x is more stable and compatible with old libraries.
Actually I wanna ask the site's crew about this.