📌  相关文章
📜  python 将列表写入文本文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:39.741000             🧑  作者: Mango

代码示例4
a_list = ["abc", "def", "ghi"]
f = open("a_file.txt", "w")
for item in a_list:
   f.write(item + "\n")
f.close()