📌  相关文章
📜  python读取文本文件到列表 - Python代码示例

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

代码示例4
# The best and most simple way is to use SimpleList
# Install: pip install simplelist
from simplelist import listfromtxt
from simplelist import txtfromlist
 
newList = listfromtxt('myFile.txt') # Make A List From A TXT File
txtfromlist('myFile.txt', myList) # Read A Python List Into A TXT File