- with open(" ", " ") as : 파일을 열고 닫는 것을 자동으로 처리
with open("study.txt", "w", encoding="ttf8") as study_file:
study_file.wirte("파이썬을 열심히 공부하고 있어요.")
with open("study.txt", "r", encoding="utf8") as study_file:
print(study_file.read())
import pickle
with open("profile.pickle", "rb") as profile_file:
print(pickle.load(profile_file))
-출처-