Packages and Modules in Python

We learned that Python functions and methods are really useful and can be used to solve many of our problems. We can even take functions written by others to solve our problems. When new functions and methods are written, they can be standardized and distributed so that a large numebr of Python developers can use them in their projects. However, it's not a good idea to distribute all these functions as a part of the core Python distribution. This is where packages come into play. A Python package is like a directory of Python scripts. Each script is a module. Modules in Python are simply Python files with the .py extension, which implement a set of functions. Each Module is designed to solve a particular set of problems.

Create Your Free Account

Create a free account to access this content and join our community of learners.

You'll get access to:

  • Access the full tutorial
  • Join our learning community
  • Track your progress
  • Bookmark content for later