Python - File Reading and Writing Strategies
Find the bug in this code:
with open('notes.txt', 'w') as f:
f.write('Note 1\n')
with open('notes.txt', 'a') as f:
f.write('Note 2\n')
with open('notes.txt', 'w') as f:
f.write('Note 3\n')
print(open('notes.txt').read())