Skip to content

Commit

Permalink
From wangperian 9 selfteaching#694
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolai authored Apr 19, 2019
1 parent 450d716 commit 5f7ca4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdown/Part.1.E.7.files.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ f.close()
second line
third line

与之相对的,我们也可以用 `file.writelines()` 把一个列表写入到一个文件中,按顺序每一行写入列表的对应元素
与之相对的,我们也可以用 `file.writelines()` 把一个列表写入到一个文件中,按索引顺序(从 0 开始)逐行写入列表的对应元素:

```python
a_list = ['first line\n', 'second line\n', 'third line\n']
Expand Down

0 comments on commit 5f7ca4f

Please sign in to comment.