What is Python? Python introduction

Python (KK English pronunciation: /’pa) n/, DJ English pronunciation: Pai theta n/) is an object-oriented, literal computer programming language, which was invented at the end of 1989 by Guido van Rossum. The first public release was issued in 1991. Python syntax is simple and clear, with rich and powerful class libraries.

What is Python? Python introduction

文章插图
Python Code picture
It is often nicknamed Glue Language, and it is easy to connect modules made in other languages (especially C/C++). One common application is to use Python to quickly generate the prototypes of the program (sometimes even the final interface of the program), and then rewrite in a more suitable language for some of the parts of the program that have special requirements. For example, the 3D game graphics rendering module, speed requirements are very high, you can use C++ rewrite.
The main features of Python
1, Python is simple
Python is a language that represents simplistic ideas. Reading a good Python program feels like reading English. It allows you to focus on solving problems rather than understanding the language itself.
2, Python easy to learn
Python is extremely easy to use, because Python has an extremely simple syntax.
3, Python free, open source
Python is one of FLOSS (Free / Open Source Software). Users are free to publish copies of the software, read its source code, make changes to it, and use part of it in new free software. FLOSS is based on the concept of a group sharing knowledge.
4, Python high level language
Writing a program in Python does not require consideration of underlying details such as how to manage the memory your program uses.
5, Python transplantable
Because of its open source nature, Python has been ported to many platforms (modified to work on different platforms). These platforms include Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, etc.
6, Python interpretative
A program written in compiled languages such as C or C++ can be converted from the source file (C or C++ language) to a language used by your computer (binary code, 0 and 1). This process is accomplished by a compiler and different tags and options.
When running a program, the Connector/Reproducer software copies your program from the hard disk into memory and runs it. Programs written in Python do not need to be compiled into binary code. You can run the program directly from the source code.
Within the computer, the Python interpreter converts the source code into an intermediate form called a bytecode, and then translates it into a machine language used by the computer and runs. This makes it easier to use Python. It also makes the Python program easier to transplant.
7, Python object oriented
Python supports both process-oriented and object-oriented programming. In a “process-oriented” language, a program is built from a process or just a function of reusable code. In object-oriented languages, programs are constructed from objects that combine data and functionality.
8, Python extensibility
If a critical section of the code is needed to run faster or if some algorithms are not open, some programs can be written in C or C++, and then used in the Python program.
9, Python Embeddedness
Python can be embedded into C/C++ programs to provide scripting capabilities to program users.
10, Python rich library
The Python standard library is really huge. It can help handle a variety of tasks, including regular expressions, document generation, unit testing, threads, databases, web browsers, CGI, FTP, e-mail, XML, XML-RPC, HTML, WAV files, password systems, GUI (graphical user interface), Tk, and other related operations. This is called the “fully functional” concept of Python. In addition to the standard library, there are many other high-quality libraries, such as wxPython, Twisted and Python image libraries and so on.

推荐阅读