更新时间:2022-05-09 21:36:08
要保存到文件,您必须在Write-Append模式下将其打开.
In order to save to a file, you have to open it in Write-Append mode.
library_file = open("a.txt", "a")
...
library_file.write("Some string\n")
...
library_file.close()
有关更多信息,请参阅内置函数上的Python文档.
Refer to Python's documentation on Built-in Functions for more information.