An import statement looks innocent, and does a good deal. Python checks whether it already has the module. If not, it asks a series of finders where the module is, a loader reads and executes it, and the result is stored so that the next import costs nothing. Each of those steps is an object that you can inspect and, as the last module of this level shows, replace. This lesson follows one import from start to finish.
More lessons in Complete Python Programming