Python - File Reading and Writing Strategies
What will be the output of this code?
with open('data.txt', 'w') as f:
f.write('Hello')
with open('data.txt', 'a') as f:
f.write(' World')
with open('data.txt', 'r') as f:
print(f.read())