An order list is a collection of customer orders kept for review or processing. In a coffee shop application, it lets the shop see what to prepare and for whom. section 1.0 section 11.0
Build the list one small step at a time:
- Load existing orders from orders.json; use an empty list when the file does not yet exist. section 11.0
- Represent each new order as a dictionary containing the customer name, drink, flavor, and topping. section 11.0
- Append the dictionary to the order list after the customer submits the form. section 11.0
- Save the updated list back to orders.json so the orders remain available. section 11.0
A coffee order list
A customer named Erik submits a coffee with vanilla flavor and chocolate topping. The application creates one dictionary, appends it to orders, saves the list, and uses the order values when displaying the confirmation. section 11.0
