python 读取TXT内内容,按行存入list

def ReadTxtName(rootdir): lines = [] with open(rootdir, 'r') as file_to_read: while True: line = file_to_read.readline() if not line: break
相关文章
相关标签/搜索