There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Aside from code for one sec, is this task a reference to the movie “Air Bud: Golden Receiver” changed slightly to stay safe on the copy-right side of things? THIS MOVIE
I haven’t watched it myself, just found it while googling (for some reason) to see if Air Buddy was real…
I think the explanation: “using the file object’s .write() method appends whatever is passed to the end of the file in a new line.” is not up to date or just wrong.
They are not directly added in new lines, but in the same line. For accessing new lines you could write for example:
with open('cool_dogs.txt', 'a') as cool_dogs_file:
cool_dogs_file.write("\nAir Buddy")
I think it happens when you assign the write method to a variable. Try using that method without assigning it to another variable and then reading the file.