Skip to content

Typing practice problems in Python

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 50 of 138

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
Audit a Library for Import-Time Side Effects Hard
Batch an Async Stream and Close Its Source Hard
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 Converter Other Code Can Extend Hard
Build an ABC with an Abstract Property and Classmethod Easy
Build a Paginator You Can Close Early Medium
Build a Payment Error Hierarchy Medium
Build a Registry That Does Not Keep Objects Alive Medium
Build a Streaming Pipeline from Start to Finish Hard
Build a Task Queue That Keeps Arrival Order for Ties Medium
Build a Typed Factory Fixture 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 the Backends That isinstance Lets Through Medium
Change an Attribute for One Block and Put It Back Medium
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
Clean Up Old noqa Comments Easy
Close a Stream Only If You Opened It Easy
Close Only What You Created Medium
Collect Every Failure in a Batch Medium
Collect Every Result Before You Join the Workers Hard
Compute a Rolling Median with a Bounded deque Medium
Control Variance in Your Own Generic Classes Hard
Convert Dataclasses to JSON-Ready Values Hard
Copy a One-Shot Iterator into Separate Lists Medium
Count and Total Rows per Key with groupby Medium
Count N-Grams and Break Ties with Counter Easy
Decode a Three-Bit Permission Mask Medium
Deep-Copy Only the Sections You Choose Medium
Describe a Dictionary's Keys with TypedDict Easy
Describe Nested JSON with a Recursive Type Alias Medium
Diff Two Dataclass Records Field by Field Hard
Escape HTML and Build SQL Parameters with t-Strings Hard
Expand a Dependency Group into Its Requirements Medium
Expand parametrize Tables into Test Cases Medium
Find Every Unpicklable Value in a Nested Payload Medium
Find Import Chains That Reach a Forbidden Package Hard
Find One Import Cycle Easy
Find Out What isinstance Checks on a Protocol Hard
Find the Files Missing from a Wheel Easy