Home > Article > Backend Development > python module
Modules: self-contained and organized snippets of code
Import: the operation of appending properties from other modules to your module
imptee.py
Python code
foo='abc' def show(): print 'foo from imptee:',foo impter.py
Python code
import imptee from imptee import foo,show show() foo = 123 print 'foo from impter:',foo show() print 'imptee.foo:',imptee.foo foo from imptee: abc foo from impter: 123 foo from imptee: abc imptee.foo: abc