with open('millay_sonnet.txt') as sonnet_doc:
first_line = sonnet_doc.readline()
second_line = sonnet_doc.readline()
print(second_line)
The text above is used as an example to explain how to print a file one line at a time. I’m curious, it seems like first_line and second_line would be equal to the same thing, why don’t they? Https://www.codecademy.com/courses/learn-python-3/lessons/learn-python-files/exercises/reading-a-line