Python - File Reading and Writing Strategies
What will be the output of this code snippet?
with open('data.txt', 'r') as f:
lines = []
for _ in range(3):
lines.append(f.readline().strip())
print(lines)