Write to file all lines.
f = open(\'j:/text.txt\', \'r\') lines = [] for line in f: lines.append(line) f1 = open(\'j:/out.txt\', \'a\') f1.write(\'\'.