Codington
0 of 6 problems solved • 0%

Exercise prompt

Flag Low Stock

A reorder list needs the product names and their quantities at the same time.

Example

Read both parts of each entry on a scoreboard.

scores = {"A": 6, "B": 4} for team, points in scores.items(): print(f"{team} scored {points}") # A scored 6 # B scored 4

The items method supplies pairs. A condition can use the second value while the result records the first.

Your task

Return an alphabetically sorted list of product names whose stock is at or below limit. For {"tape": 1, "ink": 0, "paper": 5} and a limit of 1, return ["ink", "tape"].