What is module definition?

I was reading python document and came across “module definition”. I don’t know what it means.

Namespaces are created at different moments and have different lifetimes. The namespace
containing the built-in names is created when the Python interpreter starts up, and is never
deleted. The global namespace for a module is created when the “module definition” is read in;

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

that’s usually (but not always in the top of the document). You’re often importing a new library that extends the capabilities of python. But sometimes it can just be a small file link.

common ones include

from datetime import datetime
from pandas import pandas as pd