Modules and Packages

Get introduced to the Python’s modules and packages in this lesson.

We'll cover the following...

Python modules

Most languages allow reusable chunks of code to be bundled up and made available to other code. Python supports this through modules.

In Python, a module is simply a Python file imported into another Python file. For example, if we create a file called mymodule.py and add a test function:

Press + to interact
def test():
print('test')

Now create another file called main.py ...

Access this course and 1400+ top-rated courses and projects.