Python基础 · 免费预览
文件与 JSON
写入和读取文本文件,逐行处理文件内容,并把结构化数据保存为 JSON。
1. Overview
Overview
2. Writing a Text File
Writing a Text File
3. Reading Line by Line
Reading Line by Line
4. Appending to a File
Appending to a File
5. Saving Structured Data as JSON
Saving Structured Data as JSON
6. Write and Count
Write and Count
7. A Record as JSON
A Record as JSON