target = open(filename, 'a+')
line1 = input('line 1: ')
line2 = input('line 2: ')
line3 = input('line 3: ')
line4 = line1 + '\n' + line2 + '\n' + line3
print(line4)
target.write(line4)
target.close()
In python why it won't print without newline