Skip to content

Commit

Permalink
Merge pull request #209 from pyconjp/add-close-method-to-list-5.8
Browse files Browse the repository at this point in the history
追記モードでファイルに書き込むサンプルコードにclose()メソッドの呼び出しを追加
  • Loading branch information
ryu22e committed Jun 28, 2023
2 parents bcb3485 + d30e170 commit 91e4b90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/textbook/5_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Hello Python
>>> f = open('pycamp.txt', 'a', encoding='utf-8')
>>> f.write('こんにちは世界\n')
8
>>> f.close()
```

{numref}`append-mode` の結果、追記後の `pycamp.txt` の内容は次のようになります
Expand Down

0 comments on commit 91e4b90

Please sign in to comment.