다운로드 |
f=open('today.txt','w',encoding='utf-8') vToday=input('오늘은 기분이 어떠세요?') f.write(vToday) f.close() |
다운로드 |
f=open('today.txt','a',encoding='utf-8') vToday=input('오늘은 기분이 어떠세요?') f.write(vToday) f.close() |
다운로드 |
f=open('today.txt','a',encoding='utf-8') # a : 이어쓰기 모드 vToday=input('오늘은 기분이 어떠세요?') f.write('\n'+vToday+'\n') #줄바꿈 추가 f.close() |
728x90
'■ 현재-ing > ㅡPython' 카테고리의 다른 글
파이썬 원 여러개 그리기, 신호등, 거북이 이동 리스트 (0) | 2020.07.07 |
---|---|
파이썬 max, min, 평균 (0) | 2020.07.07 |
파이썬 텍스트파일 읽어오기, open,r,w,a,encoding,read,readline,row (0) | 2020.07.07 |
파이썬 window, command=quit, mainloop, 사진, messagebox, file (0) | 2020.07.06 |
파이썬 재귀함수, 재귀 호출, while (0) | 2020.07.06 |