Python strongly encourages you to organize function definitions and other statements in separate files. These files are called modules. A module is a text file containing Python definitions and statements. The filename is the module name with the suffix .py appended.
TECHNICAL Some Python modules are written in languages other than Python, STUFF most commonly C or C++. Such a module is called an extension module.
In the following sections, we give you the lowdown on creating your own modules, getting access to the modules that come with Python, and using modules in your programs.
Was this article helpful?