Python Language Difference between Module and Package Modules

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

A module is a single Python file that can be imported. Using a module looks like this:

module.py

def hi():
    print("Hello world!")

my_script.py

import module
module.hi()

in an interpreter

>>> from module import hi
>>> hi()
# Hello world!


Got any Python Language Question?