Skip to content

Intermediate Challenges

15 challenges covering decorators, generators, classes, async programming, file I/O, and advanced data structures.

Some challenges require standard library imports (noted in each file). No third-party packages are needed.

Challenge List

# Challenge Concepts Time
01 Decorator Timer Decorators, functools, time 30 min
02 Context Manager Context managers, file I/O 30 min
03 Generator Pipeline Generators, yield, chaining 30 min
04 Class Registry Decorators, classes, global state 35 min
05 Retry Decorator Decorators, exceptions, backoff 35 min
06 LRU Cache Dicts, doubly-linked lists, O(1) ops 45 min
07 Event Emitter Classes, callbacks, pub/sub pattern 35 min
08 Validate Schema Recursion, dicts, type checking 40 min
09 Parse Log File String parsing, regex, data classes 35 min
10 Batch Processor Generators, itertools, chunking 30 min
11 Rate Limiter Token bucket algorithm, time 40 min
12 Tree Traversal Trees, BFS, DFS, queues 40 min
13 Async Fetcher asyncio, aiohttp concepts, semaphore 45 min
14 CLI Parser String parsing, argument handling 40 min
15 Plugin Loader importlib, dynamic loading, protocols 45 min

How to Start

Make sure you are comfortable with the beginner challenges before starting these. Each challenge introduces a design pattern or technique used in production Python code.