将txt文件读取并转换成二维列表的函数
将txt文件读取并转换成二维列表的函数
# 将txt文件读取并转换成二维列表的函数
def txt2list(path):
file = open(path,'r')
conent = file.readlines()
nested_list = [line.strip().split(',') for line in conent]
file.close()
return nested_list
...
原创
2020-12-30 19:56:20 ·
867 阅读 ·
0 评论