Python Learning Notes (i)-python Introduction and application

Source: Internet
Author: User

Python's design philosophy is "elegant", "clear", "simple", the Python developer's philosophy is "in one way, preferably there is only one way to do", is committed to the optimization of development efficiency: concise syntax, built-in toolkit, no need to compile. Because of this conceptual difference, Python source code is often thought to be more readable than Perl and can support large-scale software development. These guidelines are called "python maxims ." Run within the Python interpreter import this to get a complete list Python is "The most fit for brain thinking habits", the most attractive feature is quality and efficiency, and has a good readability, convenient cross-platform porting.

can be defined as an object-oriented scripting language, commonly used in three purposes: (1) Shell tools-execution from the command line, to invoke other programs, file processing and other tasks, this is a small part of Python application scope, (2) Control language-control of other application components "bonding layer", facilitates the interaction between different components; (3) prototyping-simple to use, easy to extend, and apply to fast job tasks. So, Python is called the "scripting language" because of its convenience, not the scope of application. In fact, Python is a high-level language with a wide range of applications.

Advantages of Python:

(1) Free, easy to use-use and distribution is completely free, with no restrictions on product release, and responsiveness and support to user needs, developers have endless documentation and source code base. Python has simple syntax, no compilation, no connection, and so on, with interactive experience and fast modification, the core language is easy, readable, easy to use, short to develop, and powerful.

(2) Object-oriented-python is an object-oriented language that supports multiple, overloaded, and multiple inheritance features, supports object-oriented programming, and supports process-oriented.

(3) Portability-python standard implementation is written by ANSI C, platform-independent, the core language and library on any platform is the same, most of the peripheral interface has an extension for the corresponding platform. Python programs can run on computer platforms (Linux, Unix, Windows) without modification or minor modifications. The Python program compiles the generated bytecode and runs the same results on all Python-compatible platforms.

(4) can be mixed with other languages-python can be "bonded" to other languages in a variety of ways, and is a good quick prototyping tool.

The disadvantage with respect to C/c++,python is that the execution speed is slow and is interpreted as a high-level language. Python compiles the source program statements into the intermediate form of bytecode (a platform-independent format, portable), and then interprets execution, and C + + is compiled into the underlying binary code. Python's execution speed is in the middle of the traditional compilation language and the traditional interpretation language.

In other words, the program is a sub-application. In the field of real-time computing where large amounts of data are needed (such as the physical layer of wireless communication), it is necessary to maximize the computational efficiency of the CPU, use C language and optimize execution speed through various optimization methods. On the other hand, in "real life" (meaning the foreground, human interface, etc.), Python speed is fast enough, plus now the CPU processing speed, enough to exceed people's response speed. In addition, even in the field of real-time computing, it is necessary to adopt a separate architecture-real-time processing of parts and support, which can be used to connect the entire system through Python.

Python is used in a wide range of applications, from website building, game development to robotics, and space control. Below is an overview of its common areas:

(1) System programming-to write portable maintenance operating system tools, inter-process communication, file processing and so on.

(2) Component integration-extended via C/C + +, nested c/C + + properties, becomes an adhesive language used to process other systems or components, such as test boxes, to invoke other components in the library.

(3) Rapid prototyping-easy and quick prototyping, and then moving it to C + +, maintenance is easy.

Python can also be used for user interface GUI, Internet scripting, scientific computing, artificial intelligence, XML, and so on.

Python Learning Notes (i)-python Introduction and application

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.