I. Understanding of Python
1. The standard implementation of Python is to compile the statement of the source code into the form of a bytecode and then interpret the bytecode. Because bytecode is a platform-independent form, bytecode is portable. But Python does not compile the code into the underlying binary code (such as an Intel chip directive), so the Python program will be slower than a fully compiled language like C.
2. Advantages of Python:
(1) Object-oriented
(2) Free
(3) The standard implementation of portability Python is written in portable ansic and can be compiled and run on all current mainstream platforms
(4) Powerful python has the simplicity and ease of use of all scripting languages and has advanced software engineering tools that can be found in the compiled language:
① dynamic type: Python keeps track of the kind of objects at any time during the run and does not require a declaration of complex types and sizes in code
② Automatic memory Management: Python automates object assignment and automatically revokes objects when they are no longer in use (garbage collection)
③ Large Program Support
④ built-in object types: Provides a common data structure as a basic component of the language. Like a list, a dictionary (dictionary), a string.
⑤ built-in tools: Handling objects with powerful standard operations like merging (concatenation), sharding (slice), sorting (sort), mapping (mapping)
⑥ third-party tools: open source, so it can support many free tools such as XML, database, image processing, etc.
⑦ can be mixed: Python programs can be ' glued ' together in many ways with components written in other languages, such as Python's C-language API, which helps Python to invoke C programs flexibly.
Python Basic Learning Chapter One