Use two kinds of python files

table of Contents

Use two kinds of python files

There are two kinds of python file uses a file that can be executed, one is imported as a module.

Number a python file can have two kinds of uses:

  1. Script / executable file, a file is the entire program, it can be directly used to perform
  2. Module, the file is stored with many functions, can be imported to use. Let another file can also be used.

== execute files and modules file is relative ==

Guess you like

Origin www.cnblogs.com/chenziqing/p/11372506.html