import pickle
# profile_file = open('profile.pickle', "wb")
# profile = { '이름': '박정훈', '나이' : 20, '취미' : ["코딩", "개발"]}
# print(profile)
# pickle.dump(profile, profile_file)
# profile_file.close();
profile_file = open('profile.pickle', "rb")
profile = pickle.load(profile_file)
print(profile)
profile_file.close()
# with 문을 탈출하면서 자동 종료된다.
import pickle
with open('profile.pickle', "rb") as profile_file:
print(pickle.load(profile_file))
# with 문 없이 파일 생성
with open('study.txt', "w", encoding="utf=8") as study_file:
study_file.write('파이썬 공부하고 있어요')