1. Definition:
Modules: Logically organizing python code (variables, functions, classes, logic: Implementing a function, which is essentially the. py end of the file)
2. How to Import
Import Module_name,module_name2,......
From module import Module1,module2,....
From module import logger as xxx: equals an alias for the imported module
The From module import * may have the same name as the existing module under the current path
3.import Nature (Path search and search path)
The essence of the import package: Execute the __init__.py file under the package,
Import package differs from Import module: Import package, the following module call executes directly
4. Import optimization
From module file import method, can avoid repeatedly to find this file, can greatly save time
5. Classification of modules
A standard library:
B Open Source module:
C Custom Modules:
Python3 Fifth Zhou (module, Introduction method, Import essence, import optimization, module classification)