スッキリわかるPython入門よくある質問(スッキリPython)2022/10/18FAQ# open関数で使用する文字コードを指定する(UTF-8の場合) file = open(‘diary.txt', ‘a', encoding='utf-8′)