Need yesterday’s coffee orders? Open the JSON file for reading, hand the file object to json.load(), and store the returned Python value. section 8.0
Read saved orders
import json f = open("orders.json", "r") saved_orders = json.load(f) print(saved_orders)
The small recipe is:
- Open the JSON file in reading mode. section 8.0
- Pass the file object to json.load(). section 8.0
- Assign the returned value, such as a list of order dictionaries, to a variable. section 8.0


