Python 2 and Python 3

A key topic to be discussed from the beginning isPython2 vs Python 3 discussion.

Python 3 was launched in 2008 and has been developed as the main Python version, while Python 2 continues to be maintained through bug fixes and security patches until early 2020.

On that day, Python 2 support ceased.

Many programs are still written in Python 2, and organizations are still actively using them, because porting to Python 3 is not easy, and upgrading these programs requires a lot of work. Large and important migrations always introduce new errors.

Therefore, you may happen to have to use the Python 2 code base. Well, this is not the beginning of the book.

However, unless you must follow the rules set by your organization to enforce the use of Python 2 or one of the libraries you must use has not been upgraded to Python 3, new code should always be written in Python 3.


More python tutorials: