Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Modules are a logical way to physically organize and distinguish related pieces of Python code into individual files. Modules can contain executable code, functions, classes, or any and all of the above.
When you create a Python source file, the name of the module is the same as the file except without the trailing “.py” extension. Once a module is created, you may “import” that module for use from another module using the import statement.