Python基础之文件读取的讲解 withopen(filename)asfp:dataMat=[]forlineinfp.readlines():#fp.readlines()返回一个list,listofstrs#也即line类型 python基础之文件读取