Introduction to Python – Modules
You can follow along with the code at Github.
- A module in Python allows you to put definitions in a file and use them in a script or in an interactive instance of the interpreter.
- Definitions from a module can be imported into other modules or into the main module.
- I have created a module named fibMod.py which we will import into the interpreter and Visual Studio Code.

- The module must be in the same path or have the path specified for it to be imported.

- NOTE: You can import modules in the interpreter.

- Example of importing the module using VS Code.

Leave a Reply