Why is my Python script not writing the last few lines into my file?

后端 未结 1 1164
自闭症患者
自闭症患者 2021-01-21 14:54

I\'ve been trying to read lists of numbers from one file, split them up, and put them into another file. After messing with a few debug prints, I\'ve come to the conclusion that

相关标签:
1条回答
  • 2021-01-21 15:25

    You need to close your file handler so it actually writes and cleans everything up.

    outHandle.close()
    

    add that to the end.

    close implies flush: does close() imply flush() in Python?

    0 讨论(0)
提交回复
热议问题