Modules
Modules: Libraries of Code¶
A module is a file containing a set of functions and variables you want to include in your application.
Why use Modules?¶
- Don't Reinvent the Wheel: Use code written by experts for complex tasks (like math, networking, or AI).
- Modularity: Keep your project files small and organized by splitting them into different files.
How it works?¶
- Importing: You "bring in" the module into your current file.
- Built-in Modules: Modules that come pre-installed with the language.
- External Modules: Modules created by other developers that you can download.
The Lego Analogy
Modules are like Lego sets. You can build your own pieces, but you can also use ready-made kits to build complex things faster!