First, Introduction
1. Background knowledge
Python is a concise and powerful object-oriented programming language.
Widely used in web development, software development, scientific computing, big data analysis, automated operation and maintenance, etc.
The differences and characteristics of mainstream language
C\c++: High learning cost, long learning cycle, low-level system, in the development of hardware-driven, embedded, game engine development and other fields have a wide range of applications
Java: The most widely used programming language, the first cross-platform language, is widely used in large-scale ERP software development \ Android App development \ Website development
Python: The field of use is almost as broad as Java, but the development efficiency is higher than Java, and the learning cost is lower, in the scientific computing \ Data analysis \ Web development \ Crawler development \
The advantages of cloud computing, automation, automation testing and other fields are obvious
PHP: The most widely used web development language, ideal for small to medium-sized web development, low learning costs, high development efficiency
2. Introduction to Python
Python founder Guido Van Rossum, who called "Uncle Turtle", developed a new scripting interpreter during Christmas 1989 to pass the time in Amsterdam
As an inheritance of ABC language
Early translation compilation/interpretation, language classification
| Compiled type |
Explanatory type |
Mixed Type |
| C |
Javascript |
Java |
| C++ |
Python |
C# |
| Go |
Ruby |
|
| Swift |
Php |
|
| Object-c |
Perl |
|
| Pascal |
Erlang |
|
Compiled type
Pros: Compilers typically have pre-compiled procedures to optimize code. Because the compilation is done only once, the runtime does not compile, so the compiler language program execution is high efficiency. Can run independently from the language environment.
Cons: If modifications are required after compilation, the entire module will need to be recompiled. Compile the time according to the corresponding operating environment to generate machine code, the migration between different operating systems will be problematic,
You need to compile different execution files according to the operating system environment you are running.
Explanatory type
Pros: Good platform compatibility, can be run in any environment, provided the interpreter (virtual machine) is installed. Flexible, modify the code when the direct modification can be quickly deployed, without downtime maintenance.
Cons: Every time you run, you have to explain it again, performance is not as good as the compiled language.
Python pros and cons
Advantages: Simple and easy to learn, easy to get started
High-level language----No need to consider the underlying details such as how to manage the memory used by your program
Portability----All your Python programs can run on virtually any system platform on the market without modification
Extensible mode----If you need to run your piece of critical code faster or you want some algorithms to be private, you can write some of your programs in C or C + + and then use them in your Python program
Embeddable type----You can embed Python in your C + + program to provide scripting capabilities to your program users
Disadvantages:
Slow operating Speed
Code cannot be encrypted
Threads cannot take advantage of multi-CPU issues (a compromise solution)
Python Automation Development-Introduction