6. Modules and Packages
In Python we have the standard libraries which come default. There are millions of lines of code available in 3rd party libraries that have been written over the years. And we can write our own libraries of functions.
If I do work in a single thematic area once, as I properly structure and save the code, I can easily reuse this code in any later project. Read https://realpython.com/python-modules-packages/ to get some background.
Since Python 3 was released, we have had a technique called virtual environments (venvs). I have avoided using these up to now, but from Python 3.12 onwards, for a range of reasons, we need to use venvs.
Before you begin. create a directory to keep example files in and you are ready to code.
This could be on your OneDrive, in these examples, I am using OneDrive\Python\Exercises_06
Last updated