python study diary 1

1. Introduction to Python

1. Birth and application of python

  The founder of python is Guido van Rossum. During Christmas in 1989, Guido Van Rossum (Chinese name: Uncle Gui) decided to develop a new script interpreter as a successor to the ABC language in order to pass the time in Amsterdam.

The main application areas of python at present:

  There are mainly cloud computing, web development, scientific computing, artificial intelligence, system operation and maintenance, financial analysis, etc. Python can be said to be more and more widespread because of its powerful third-party libraries.

2. What is a programming language

  First of all, for this problem, we need to understand the difference between the compiled type and the interpreted type. The compiled type is to compile the source program into machine language, that is, save it as a binary file, so that the program can be run directly in machine language at runtime, which is very fast. ; 

  For the interpretation type, on the contrary, the source program is to translate each sentence into machine language for the computer to execute before execution, so in terms of speed, the interpretation type is slower, but the gap is between 0.01-0.1 seconds, so In terms of search engines, compiled languages ​​are used to write the bottom layer, which can ensure the query speed. (This is because computers only understand machine language, i.e. binary files)

  Advantages and disadvantages of both:

compiled

  Advantages: The compiled type only needs to compile the executable file once, and then it can be directly executed, so it has high running efficiency and can be used out of the language environment.

  Disadvantages: If you need to modify it after compilation, you need to modify the entire module, and there will be problems in porting between different operating systems.

interpretive

  Advantages: Strong compatibility, can run between different operating systems, as long as there is a virtual machine (interpreter), the code can be modified and adjusted at any time without downtime for maintenance.

  Disadvantages: The execution efficiency is low, and it needs to be translated into machine language before each run.

3. The advantages and disadvantages of python

advantage:

  1. The positioning of the python language is 'elegant', 'simple', and 'clear', so the learning difficulty is relatively low.

  2. The development efficiency is high, and the third-party library is very powerful, which can realize most functions.

  3. High-level language, no need to consider the underlying design such as memory.

  4. Portability, open source enables python to be ported to many fields.

  5. Scalability, can be combined with c or other languages.

  6. Embeddability.

shortcoming:

  1. The running speed is slow.

  2. The code cannot be encrypted.

  3. Threads cannot take advantage of multiple cpu issues.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324715488&siteId=291194637