Practice ยท 3 of 3
Typed Payload
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.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Annotation Drills