Define and use a module : Module « Language Basics « Python
- Python
- Language Basics
- Module
Define and use a module
#//File: b.py
def spam(text):
print text, 'spam'
#///////////////////////////////////////////////////////////////////////////
#//File: Main.py
import b
b.spam('gumby')
Related examples in the same category