18 Modules and Packages
Modules allow the source code to be structured into independent units. A module usually provides data types and functions that serve a specific purpose, such as working with files of a particular file format. Modules can be imported into a program and then provide the programmer with the included functionality. Basically, there are three types of modules:
-
Modules of the standard library are present in every Python installation and can therefore be expected by every Python program. Some of the standard library modules can be found in the lib/python3.11 subdirectory of the Python installation. Some other standard library modules, for example sys, are implemented directly in the Python interpreter and are called built-in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access