# w 는 덮어쓰기 a 기존 데이터에 추가로 작성하기
with open("data/new_file.txt", 'w') as f:
f.write("new test file\n")
'program > python' 카테고리의 다른 글
[python] 파이썬 인터렉티브 모드 (0) | 2024.01.28 |
---|---|
[python] 파워셀에서 실행하기 (0) | 2024.01.28 |
[python] text 파일 읽기 (0) | 2024.01.28 |
[python] strip (0) | 2024.01.28 |
[python] 리스트와 문자열 (0) | 2024.01.28 |