Python - File Handling Fundamentals
Identify the error in this code snippet that tries to read a file line by line:
file = open('notes.txt', 'r')
for line in file.read():
print(line)
file.close()