Ok so for the last couple of days I have been struggling with file handling. Here is my problem I create a new file and write some text into it. Then I open it again to add more text to it but somehow the new text is being written in the same line as the previous text without leaving space between each other.
here is my code:
test =open("Hello World.txt", "w")
test.write("Hello World!")
test.close()
test = open("Hello World.txt", "r")
test.read()
'Hello World!'
test.close()
test = open("Hello World.txt", "a")
test.write("hello world!")
test.close()
test = open("Hello World.txt", "r")
test.read()
'Hello World!hello world!'
As you can see after I appended more text into the file i ended up with 'Hello World!hello world!', when I wanted to get them spaced out. Any solutions?