Python is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum in 1989, and the first public release was released in 1991.
As of June 2017 Tiobe programming language ranking, Python has risen to fourth place
Compiled, interpreted, and mixed-type
Type: Compile type
Mechanism: The compiler generates the machine code for the source code, and then the machine runs the Machine code (binary)
Advantages: Fast running speed, high code efficiency, post-compilation program can not be modified, confidentiality is good
Cons: Code needs to be compiled to run, portability is poor and can only run on compatible operating systems
Languages: C + +, Pascal/object Pascal, Delphi, etc.
Applications: Operating systems, large applications, database systems, etc.
Type: Interpretation type
Mechanism: The program does not need to compile, the program is translated into machine code at run time by the interpreter, and every time the execution is translated once
Advantages: Portability is good, as long as there is an interpretation of the environment, can be run on different operating systems
Cons: Running needs to explain the environment, running faster than compiling, taking up more resources, low code efficiency
Languages: JavaScript, VBScript, Perl, Python, Ruby, MATLAB, etc.
Application: Web script, server script and auxiliary development interface, etc.
Type: Mixed type
Mechanism: Provides intermediate language runtime Runtime Intermediate code, the intermediate language runtime is similar to the Java Virtual machine, the runtime is translated from JIT to machine code cache in memory, the next direct execution
Languages: Java, C #
Application: Web script, server script and auxiliary development interface, etc.
Dynamic type: The language in which data types are checked during run time, and no data types (python) are required to be assigned to any variables when writing programs
Static type: The data type of a statically typed language is determined during compilation or before it is run, and the data type of the variable is explicitly determined when writing the code
Strongly typed: A strongly typed language that, once a variable is assigned a data type, is always the data type if it is not cast by coercion. You can't treat an shaping variable as a string.
Weak types: Data types can be ignored, and a variable can have values of different data types. Once you assign a string value to an integer variable A, a becomes a character type (python)
Python Benefits:
1. Easy to understand
2. High development efficiency
3. Advanced language
4. Portability
5. Scalability
6, can embed the sex
Python drawbacks:
1. Slow speed
2. Code cannot be encrypted
3. Threads cannot take advantage of multi-core CPU issues
Python interpreter: A program used to interpret the execution of a. py file
Common Python interpreter:
CPython: (official comes with, linux default)
Ipython: An interactive interpreter based on CPython
PyPy: Using JIT technology to dynamically compile (not interpret) Python code can significantly improve the execution speed of Python code
Jpython: Can be interpreted as Java byte Code execution
Ironpython: Python code can be interpreted as. NET bytecode
Python language and features