In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to analyze Python, a sharp tool of AI development language, I believe that many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1. A brief history of Python
Python was developed by Guido van Rossum at the end of 1989 for some kind of entertainment. The Python language is based on the ABC teaching language, while ABC is very powerful and is specially designed for non-professional programmers. However, the ABC language has not been widely used, and Guido believes that it is caused by non-openness.
The "birth" part of Python has influenced its popularity. Python is very easy to use, and its grammar is very similar to natural language. For non-software professionals, it is the cheapest to choose Python, so some people with medical and even artistic backgrounds often choose Python as their programming language.
Guido avoids the disadvantage that ABC is not open enough in Python, and Guido enhances the compatibility of Python with other languages such as C, C++, and Java. In addition, Python has implemented a lot of things that are not implemented in ABC, which have greatly increased the popularity of Python.
In December 2008, Python released version 3.0 (often referred to as Python 3000, or Py3k for short). Python 3.0 is a major upgrade, and to avoid introducing historical baggage, Python 3.0 does not consider compatibility with Python 2.x. This has led to the reluctance of Python 2.x users to upgrade to Python 3.0 for a long time, and this fragmentation once affected the application of Python.
After all, the general trend is irresistible, and developers gradually find Python 3.x more concise and convenient. Today, most developers have moved from Python 2.x to Python 3.x, but some early Python programs may still use Python 2.x syntax.
In June 2009, Python released version 3.1. In February 2011, Python released version 3.2. In September 2012, Python released version 3.3. In March 2014, Python released version 3.4. In September 2015, Python released version 3.5. In December 2016, Python released version 3.6.
.
On January 1, 2020, Python2 officially launched the historical stage.
So, whether you are a novice or a veteran of Python, stop using Python2 after January 1, 2020.
2. Characteristics of Python
Python is an object-oriented, interpretive, weakly typed scripting language, and it is also a powerful and comprehensive general-purpose language.
Python's design philosophy is "elegant", "clear" and "simple". If you have used other languages before and then use Python, you will be shocked by its simplicity and elegance. Compared to other programming languages (such as Java), Python code is very simple and easy to use. For example, if we want to complete a function, if we need 100 lines of code to use Java, but only 20 lines of code may be needed to use Python, this is one of the great attractive features of Python.
Let's take the output of all even numbers between 1 and 100 as an example to illustrate the simplicity of the Python code:
Python code
Res = [i for i in range (1,101) if I% 2 = 0]
Java code
For (int iTunes 1; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.