Predict the outputExercise 4/6Elementary20 XP

Appending

Task

Without running the program, write exactly what it prints.

with open("log.txt", "w") as f:
f.write("A")
with open("log.txt", "a") as f:
f.write("B")
with open("log.txt") as f:
print(f.read())

Your answer

Put each printed line on its own line.

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.