Skip to content

Python practice problems

Difficulty:
Category & tags
Category:
Tag:

Showing 50 of 223

Title Difficulty
Accept Any Fetcher You Can Await Medium
Accept Read-Only Inputs and Return Concrete Results Medium
Accept Three Event Types with a Read-Only TypedDict Medium
Add Up Nested Sizes, Counting Each Object Once Medium
Answer Chat Commands with match and case Easy
Audit a Library for Import-Time Side Effects Hard
Batch an Async Stream and Close Its Source Hard
Bring Thread Errors Back to the Caller Medium
Build a Blocking Queue with a Condition Medium
Build a Counter That Never Goes Over Its Limit Medium
Build a Generic Result Class Medium
Build a Generic Result Type with Ok and Err Hard
Build a JSON Codec for Dataclasses Hard
Build a JSON Converter Other Code Can Extend Hard
Build an ABC with an Abstract Property and Classmethod Easy
Build an Event Router with Guards Medium
Build an Owner for Background Tasks Medium
Build a Paginator You Can Close Early Medium
Build a Payment Error Hierarchy Medium
Build a Pipeline from Small Generators Easy
Build a Rate Limiter That Reads a Fake Clock Medium
Build a Registry That Does Not Keep Objects Alive Medium
Build a Report as Text and UTF-8 Bytes Medium
Build a Request ID That Follows Tasks and Threads Medium
Build a Service That Shuts Down in Stages Hard
Build a Streaming Pipeline from Start to Finish Hard
Build a Task Queue That Keeps Arrival Order for Ties Medium
Build a Thread-Safe Cache with One Lock per Key Hard
Build a Typed Async Wrapper for Blocking Calls Medium
Build a Typed Factory Fixture Hard
Cache a Report Total Until You Clear It Medium
Capstone: Build an Async Worker Pool with Retries and Clean Shutdown Hard
Capstone: Build an Immutable Order Model from Untrusted Data Hard
Capstone: Check a Package's Layer and Import Rules Hard
Capstone: Extend the Worker Pool to Keep Going After Failures Hard
Capstone: Fix Five Performance Problems in an Order Pipeline Hard
Capstone: Give Each Upload State Its Own Type Hard
Capstone: Modernize a Typed Inventory Module Hard
Catch a Renamed Method with @override Easy
Catch Errors by Category Easy
Catch the Backends That isinstance Lets Through Medium
Catch the Broken Versions Easy
Change an Attribute for One Block and Put It Back Medium
Check a Class Before You Add slots=True Hard
Check a Run-Length Codec with Four Properties Hard
Check a Value Before You Use It Easy
Check a Version Against a Specifier Medium
Check Number Ranges at Runtime with Annotated Medium
Check That Imports Follow Your Layers Hard
Choose a Start Method for Each Platform Medium