[Base] 06_Python Python modules

1. The concept of modules

  • Modules  like  kits , in order to use this tool kit, it is necessary  to import import  this module
  • Each with the extension .py at the end of the Python source code files are a module
  • As defined in the module global variables, functions are provided to the tool module can be used directly outside

Note:

Module can define variables or functions

The module name is also an identifier

2. The use of modules

introducing import module, the module name. Variable / module name. Functions 

3.pyc files can improve program execution speed

 

Guess you like

Origin www.cnblogs.com/dujinyang/p/11260929.html