Introduction to Creating Modules & Packages

Creating Python modules is something that most Python programmers do every day without even thinking about it. Any time you save a new Python script, you have created a new module. You can import your module into other modules. A package is a collection of related modules. The things you import into your scripts from the standard library are modules or packages. In this chapter, we will learn how to create modules and packages. We’ll spend more time on packages since they’re more complicated than modules.

Get hands-on with 1400+ tech skills courses.