Skip to main content

Practice · 2 of 3

save_tasks Roundtrip

Write save_tasks(path, tasks) writing JSON (ensure_ascii=False, indent=2), then a test-visible roundtrip: after calling save_tasks("tm_rt.json", tasks) with tasks = [{"text": "viết báo cáo", "done": False}], load_tasks("tm_rt.json") must equal tasks. Print the loaded task count (one line).

Difficulty: beginner

Back to lesson: Practice: Mini Build: Persistent Task Manager Core