Practice · 3 of 3
Typed Payload
CHALLENGE
Difficulty: intermediate+25 XP
Define a TypedDict ProductDict with keys sku: str and price: float. Then implement total_price(items: list[ProductDict]) -> float summing prices. get_type_hints(ProductDict) must show both annotations.
Press Submit to check your solution.
Back to lesson: Practice: Annotation Drills