How to get Python version like codecademy's?


#1

Python I downloaded is a lot different from code academy’s version (print “cat” is print(“cat”)

What do I do? What version do I get?


#2

Keep the version you have (assuming 3.6.1) since it is installed and going forward will be the next defacto version in a couple more years. Codecademy track courses have their basis in version 2.7.x which does have some differences, the print example above being one of them.

I’ve long held the opinion that learning both versions is the best way to recognize which version is in use in code we are reading.

print (value)

works in both versions, so for forward looking purposes it does not hurt to make a practice of using the parens.

print value     # print is a construct

print (value)   # print() is a function

You can install version 2.7.x on your machine, if so desired, but there are online sandboxes that offer that version (or just use this site’s lesson environments) if practice in that version is what you seek.

Other differences that may arise relative to these courses are…

raw_input() vs. input()

range() vs list(range())

There are several differences on the whole, but in these introductory courses they won’t come up. We do not use reduce(), for instance, but could it we’ve learned it independently.