I am trying to output the result from a Python script to a text file, where each output should be stored in a string.
f1=open('./output.txt', 'a') f1.write(content + "\n")
When I open output.txt
with the usual notepad
, the results are as follows:
color amber color aqua color analysis color app color adobe color alive app
However, when I open the file with notepad++
, it looks great and every word is saved in a line.
How to make a script save the result in turn so that it shows the same thing in a regular notepad?
source share