Differences Between Python Versions 2 vs 3
So far in this section, we've talked about a number of attributes of the Python programming language. We've talked about what it is how to use it how it can be used in industry and we've also referenced some of the key best practices.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

Before we get into building Python programs and analyzing the syntax, I want to discuss the differences between Python 2 and Python 3.

At a high-level, it is simply a version difference. If you’re googling different programs online to see what they use, any programs over a decade old will have used Python 2.

For a long time, Python 2 was the default version. In fact, it is still the version that ships with operating systems such as MacOS. Meaning, if you type “Python” into a terminal on a Mac, you will most likely be using the default Python 2. This may tempt you to use it to build your programs.

However, the Python community and I do not recommend it. The reasoning behind this is that in 2020, Python 2 will no longer be supported nor will it get things like security updates. Also, it is not getting any new features, so wanting to build modern applications using Python 2 is strongly discouraged.

Python 3 is the version that is supported and constantly getting updates. At this moment, we are at Python 3.6. Its continuous updates will only keep it around for a long time. If you are building newer programs such as Django or flask API’s that work with machine learning, Python 3 will be most beneficial for you.

Throughout this entire course, we will be using Python 3.6 and utilizing the syntax that fits with this version. If you are attempting to follow along using Python 2, the programs will be built using similar syntax, but still have subtle differences.