If you’re a beginner, or if you’ve worked with other programming languages before, you probably don’t know that there’s always one of the biggest headaches when you start learning Python: versioning! Is it python2 or python3? This is very frustrating!
A search will show that Python3 and Python2 are incompatible and quite different. Which version should you learn? Here is an analysis for you:
Python3 was designed to improve Python without the burden of code compatibility, so Python3 is a big improvement, easier to understand and more reasonable than Python2.
Python3 is well supported by PyPy, various Web frameworks, scientific computing packages, Scrapy and other common modules. There are some older libraries that are no longer maintained and do not support the latest Python3, but don’t worry, these libraries are often not used or there are alternatives.
In most cases it is possible to write 2/3 compatible code directly, and compatibility layers such as six are also available.
Admittedly, python2 has more support for older libraries, and is still more popular, at least among academics.
Python3 is the future of Python
Python officially recommends learning Python3 directly
Python2 is said to only be maintained until 2020
Summary So learning Python2 or Python3 is not a problem, in fact, there is no big difference, the main thing is to make up your mind to learn, when you learn Python3, Python2 code development is no problem!
However, I still recommend learning Python3 directly, after all, its syntax is more reasonable and newer. Unless your external environment only allows you to use Python2.
The views expressed are personal