"Go" novice to learn the python2.x version or the 3.x version

Source: Internet
Author: User

If you are a beginner, or if you have been exposed to other programming languages before, you may not know that when you start learning Python, you will encounter a more frustrating problem: Version issue!! Is it learning Python2 or studying Python3? It's a very tangled one!
Search will find Python3 and Python2 is incompatible, and the difference is relatively large, in the end to learn which version? Here is to analyze for you:
In fact, Python is one of the most commonly used software on Linux, but the current version of Linux is mostly used Python2, and on Linux rely on Python2 program more, so Python3 to replace Python2 It will take a few years to become mainstream.
originally designed Python3 to improve Python without the burden of code compatibility, but personally think that the improvement is not bold enough to improve some of the bugs, and many wart missed the opportunity to improve, so the syntax is not compatible with the original idea of a lot of places.
people spend years groping slowly down, most of the cases can be directly written 2/3 compatible code, also has six such compatibility layer is available.
so the first to learn Python2 or Python3 is not a problem, or is a problem.
The current situation is the actual application of most of the Python3, sometimes pay attention to write compatible with 2/3 code. When writing new code with Python2, consider the possibility of migrating to Python3 later.
Whether you learn Python2 or Python3, you need to pay attention to the other side of the difference: Fortunately, these differences are easy to master, only one Unicode encoding to more people (and also a lot of web-related library porting the main obstacle, 3.3 re-support u ' ", the situation has greatly improved)
study Python2 or python3, use Python2 or python3 need to see the specific circumstances
so I suggest:
1. If you are in the enterprise, you need to use Python to learn python, it depends on the application of Python version of the enterprise to learn;
2. If you want more mature solutions, the least bugs, the most stable applications that use python2;
3. If you are a college student, then I suggest you study python3, and when you graduate maybe Python has become the mainstream.

"Go" novice to learn the python2.x version or the 3.x version

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.