Inflearn コミュニティ Q&A
안녕하세요?
作成
·
186
0
친절하고 쉽게 설명해주신 덕분에 강의 잘 보고 있습니다. 다름이 아니라 아래처럼 error message가 나와서 질문 드립니다.
# coding=utf-8
t_file = open("t.txt", "wb")
t_file.write(bytes("Good morning\n"))
t_file.close()
t_file = open("t.txt", "r")
pp = t_file.read()
print(pp)
t_file.close()
============================================
C:\Python36-32\python.exe C:/Python36-32/Bonjure/practice_only.py
Traceback (most recent call last):
File "C:/Python36-32/Bonjure/practice_only.py", line 4, in
t_file.write(bytes("Good morning"))
TypeError: string argument without an encoding
Process finished with exit code 1
python
回答
回答を待っている質問です
最初の回答を残してください!





