To write a file, you have to open it with mode “w” as a second parameter: >>> fout = open('output.txt', 'w') >>> print(fout) <_io.
確定! 回上一頁