I was learning about files in python 3, making a .txt and trying to write things, and I wanted to write in line:
f=open("file.txt","w")
list=['hello',''how are you?']
for a in list:
f.write(a)
f.close()
This is what I expected was:
Hello
How are you?
But the program write:
HelloHow are you?
How do I add a new line in the program?