python3文件读写与list
来源:http://www.cnblogs.com/rainowl-ymj/p/7045454.html
-------把txt文件读取到list中-------
txt文件如下:
读入list中Python代码:
如果需要展示每一行数据,可以使用for循环:
for name_list in result:
将list数据写入txt文件:
来源:http://www.cnblogs.com/rainowl-ymj/p/7045454.html
-------把txt文件读取到list中-------
txt文件如下:
读入list中Python代码:
如果需要展示每一行数据,可以使用for循环:
for name_list in result:
将list数据写入txt文件: