with 파일 입출력

배찬영·2021년 4월 17일
0

파이썬

목록 보기
20/31
with open("study.txt", "r", encoding="utf8") as study_file:
    print(study_file.read())

with를 사용하여 file 입출력 가능
with는 따로 close() 할 필요 없다는 장점이 있음

profile
안녕하세요

0개의 댓글