Python 2 vs. Python 3
- Python 2.x - old, legacy code at companies, answers on the Internet. Retires on January 1, 2020.
- Python 3.x - the one that you should use. (not fully backward compatible) Available since December 3, 2008.
Unfortunately you can still encounter many companies and many projects in companies that are stuck on Python 2. In such cases you probably will have to write in Python 2.
In addition when you search for solutions on the Internet in many cases you'll encounter solution that were written for Python 2. Luckily in most of the cases it is almost trivial to convert these small examples to work on Python 3. You just need to be able to recognize that the code was originally written for Python 2 and you need to be able to make the adjustments.
For this reason, while the majority of these pages cover Python 3, we are going to point out the places where it might be useful to know how Python 2 works.
You are free to skip these parts and come back to them when the need arises.