(기본 틀)
f = open('file.txt', 'rt', encoding='utf-8')
for line in f:
print(line, end="")
f = open('file.txt', 'r', encoding='utf-8')
for line in f:
print(line, end="")
"""
오류가 나지 않고 잘 실행됐다.
"""
f = open('file.txt', 't', encoding='utf-8')
for line in f:
print(line, end="")
"""
ValueError
"""
→ 오류 내용
Must have exactly one of create/read/write/append mode and at most one plus
: 생성/읽기/쓰기/추가 모드 중 정확히 하나만 있어야 한다.

해당 오류를 통해서 ‘t’만 사용할 수 없음을 확인했다.
(당연한 거긴 하지만 한 번 확인하고 싶었다.)
모드로는 rt 와 wt 모드가 있는 것을 검색을 통해 알 수 있다.
→ Several times here on SO I've seen people using rt and wt modes for reading and writing files.
→ t refers to the text mode. There is no difference between r and rt or w and wt since text mode is the default.
(기본 틀)
# 읽기형식 개행문자유지 / 파일 한 줄씩 읽음
with open('proverb.txt', 'r', encoding='utf-8', newline='') as filereader:
for row in filereader:
print("{}".format(row.strip())) # 공백이 제된 값이 {} 들어감.