Python Intermediate

This is where your Python starts to look like a pro wrote it. Sixteen tutorials cover modules, packages, iterators, generators, closures, decorators, context managers, regex, the collections module, datetime, and logging. These are the tools that show up in every serious codebase.

Python: Modules, Creating, Importing, Organizing Code

Somewhere around line 800, a single-file project stops being convenient and starts being a maze. Python modules are the way out: split the code into focused .py files and import what you need, where you need it. This guide covers creating and importing modules, the __name__ == ‘__main__’ guard, and exactly how Python locates your code. “Simplicity is prerequisite for reliability.” Edsger Dijkstra Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Beginner | Reading Time: 17 minutes ... Read More

Python: Packages, __init__.py, Relative Imports

One file called __init__.py is all that separates a random folder of scripts from a real, importable library. Python packages are how projects scale past a handful of modules: group related files in a directory, add that one file, and the whole folder imports as a unit. This guide covers creating packages, relative imports, __all__, and layouts that stay clean as a project grows. “The structure of a software system reflects the social structure of the organization that built it.” ... Read More