Python

Learn Python programming from scratch

344 tutorials
12 of 344 tutorials
Jul 11, 2026· 6 min read

Python Iterators vs Generators

Compare Python iterators and generators side by side, understand when to use each, and learn the tradeoffs between custom iterator classes and generator functions.

IteratorsPythonIntermediate
Jul 11, 2026· 6 min read

Python Built-in Iteration Functions

Explore Python's built-in functions for working with iterators, including map, filter, zip, enumerate, reversed, sorted, and the powerful itertools module.

IteratorsPythonIntermediate
Jul 11, 2026· 6 min read

Common Python Iterator and Generator Mistakes

Avoid the most common pitfalls with Python iterators and generators, including exhaustion, late binding, accidental materialization, and misuse of send().

PythonIntermediateIterators
Jul 11, 2026· 7 min read

Build a Data Processing Pipeline in Python

Learn how to build a complete data processing pipeline in Python using generators, from reading input to writing output, with lazy evaluation at every stage.

IteratorsPythonIntermediate
Jul 11, 2026· 8 min read

Python Decorators Explained

Learn what Python decorators are, how the @ syntax works, and why decorators are a fundamental tool for writing reusable, composable behaviour in Python.

PythonAdvanced
Jul 11, 2026· 8 min read

Create Your First Python Decorator

Learn to write your first Python decorator from scratch, understand the wrapper function pattern, and build a working timing decorator step by step.

decoratorsAdvancedPython
Jul 11, 2026· 8 min read

Decorate Python Functions with Arguments

Learn how to write Python decorators that work with functions accepting any number of positional and keyword arguments by forwarding them correctly.

decoratorsAdvancedPython
Jul 11, 2026· 7 min read

Return Values from Python Decorators

Learn how to preserve, inspect, and transform return values in Python decorators, and why the wrapper must always return the result of calling the original function.

AdvanceddecoratorsPython
Jul 11, 2026· 8 min read

Python Decorators with Parameters

Learn how to build Python decorators that accept their own arguments by adding a factory function layer, enabling configurable behaviour like custom log levels and retry counts.

AdvancedPython
Jul 11, 2026· 7 min read

Class-Based Decorators in Python

Learn how to use Python classes as decorators, why the __call__ method makes it possible, and when class-based decorators are cleaner than nested functions.

decoratorsPythonAdvanced
Jul 11, 2026· 8 min read

Real-World Uses for Python Decorators

Explore practical real-world applications of Python decorators including authentication, caching, rate limiting, input validation, and observability patterns.

decoratorsPythonAdvanced