Python 파일 flush() 메서드
예시
파일에 쓸 때 버퍼를 지울 수 있습니다.
f = open("myfile.txt", "a")
f.write("Now the file has one more line!")
f.flush()
f.write("...and another one!")
정의 및 사용
이 flush()
메서드는 내부 버퍼를 정리합니다.
통사론
file.flush()
매개변수 값
매개변수 없음