Importing Modules
Learn how to use Python's rich library of modules and build your own.
1
Introduction to Importing Modules
Modules are files containing Python code that can include functions, variables, and classes. By importing modules, you can reuse code and extend Python's functionality.
In this lesson, you’ll learn how to import and use built-in and custom modules.

2
What Are Modules?
A module is a file containing Python code. You can use modules to organize code into reusable pieces. Python comes with built-in modules, and you can create your own as well.
Examples of built-in modules include:
math: Provides mathematical functions.random: Generates random numbers.os: Interacts with the operating system.