OnlinePython

File Basics Exercise

Question 1 of 4

Which file mode should you use to add content to the end of an existing file without overwriting it?

# You want to add a new log entry to an existing log file
with open("app.log", ?, encoding="utf-8") as file:
    file.write("New log entry\n")