Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 exam•Written by the Fiveable Content Team • Last updated September 2025
Definition
Importing refers to the process of bringing in external code or modules into a program. It allows access to functions, classes, and variables defined in other files.
Related terms
Module: A module is a file containing Python code that defines functions, classes, and variables. It can be imported into other programs to reuse its functionality.
API (Application Programming Interface): An API is a set of rules and protocols that allow different software applications to communicate with each other. It provides predefined methods and data structures for interacting with a particular software component or service.
A library is a collection of precompiled code modules that provide specific functionality. Libraries are often used for common tasks such as handling dates, performing mathematical operations, or working with databases.