Python 파일 읽고 쓰기

sookyeong·2022년 3월 30일
0

파일 쓰기

f = open("data.txt", "w")
f.write(data)
f.close()

파일 읽기

f = open("data.txt", "r")
data = f.read()
print(data)
f.close()
profile
actions speak louder than words

0개의 댓글