📜  txt 列出 python 代码示例

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

代码示例3
with open('file1.txt','r') as f:
    listl=[]
    for line in f:
        strip_lines=line.strip()
        listli=strip_lines.split()
        print(listli)
        m=listl.append(listli)
    print(listl)