f = open('1') save_changes = open('2', 'w') line = f.readline() while line: save_changes.writelines(line), line = f.readline().split('a')[0] f.close() save_changes.close()
Не получается записать их через пробел.
f = open('1') save_changes = open('2', 'w') line = f.readline() while line: save_changes.writelines(line), line = f.readline().split('a')[0] f.close() save_changes.close()
viteklolsave_changes.writelines(line)
save_changes.writelines(line + ' ')