if __name__ == '__main__': list_line = [] withopen("./1.txt", "r") as f: for line in f: iflen(line)>10: print(line[4:]) line= line[4:] list_line.append(line.strip()) list_line =paixu(list_line) print(list_line) withopen("2.txt","w") as f: for line in list_line: f.write(line) f.write("\n\n")