Practicing Python 2

I just wanted to know which version of Python 2 is code academy using as of today (4/26/20)? The reason for this is that I want to practice learning Python 2 on my own and not sure what version they are using. I have downloaded other versions already and to make sure they were the same as the one on Code academy I copied and paste some of the codes from the lessons. The codes I copied and paste were from lessons that I have successfully completed but when I tried to run them an error appears. When I run them on the Codeacademy they work fine. I’m not sure what the issue is.

Hello @briandgomez!! Welcome to the codecademy forums!!

I believe codecademy’s Python 2 lessons are running the latest version of Python 2 which is 2.7.18,

However I have been running 2.7.7 because I use an older operating system and so far I have not had any errors.

1 Like

I have heard that copying and pasting code can occasionaly change the code slightly, such as adding or removing white space, and that can cause errors.

It takes longer, but I would recommend typing out the code by hand. That also helps you get used to writing it.

There is no viable reason to learn Python 2, other than to gain familiarity with the legacy language, which is now past its end-of-life date and no longer supported. However, CC has not yet made Python 3 available to free users, except those who have been granted free access through the COVID-19 Learn From Home program.

REPL.IT has Python 3 on their sandbox platform. That can be useful when comparing version 2 to version 3.

   version 2             version 3

print expression      print(expression)

raw_input('prompt')    input('prompt')

among many other differences which will eventually surface with study and reading.