📜  制作一个 txt 文件然后写入 - Python 代码示例

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

代码示例1
#open text file
text_file = open("C:/Users/rowgi/Jupyter/Sentimental/Better/pwords.txt", "w")
 
#write string to file
text_file.write(pwords)
 
#close file
text_file.close()