Appending to a File Exercise

I am working through the python 3 course in the files section. I am on part 5 of 13 in the lesson.

Here’s the link to the exercise:

I am encountering an error when trying to append a new line to my code. When i try to append a new string to my file, it adds the string to the last line(essentially concatenates the string i input with the string of the last line) without creating a new line.

1 Like

Notice how all the other entries include the newline escape sequence, \n. Try including that.


Great that looks to have worked! I thought appending automatically added it to the new line so I was confused. Thank you.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.