Python Basics: Modules and Packages

As you gain experience writing code, you’ll eventually work on projects that are so large that keeping all the code in a single file becomes cumbersome.

Instead of writing a single file, you can put related code into separate files called modules. You can put individual modules together like building blocks to create a larger application.

In this video course, you’ll learn how to:

  • Create your own modules
  • Use modules in another file through the import statement
  • Organize several modules into a package

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. You can also check out the other Python Basics courses.

Note that you’ll be using IDLE to interact with Python throughout this course.

What’s Included:

Downloadable Resources:

Related Learning Paths:

Separating Your Code Into Modules

3 Lessons 4m

About Philipp Acsany

Philipp Acsany Philipp Acsany

Philipp is a Berlin-based software engineer with a graphic design background and a passion for full-stack web development.

» More about Philipp

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

« Browse All Courses