Answer:
Answered below
Step-by-step explanation:
#file is first opened and saved into file_object variable.
file_object = open('new_file.txt', 'r')
file_contents = file_object.readlines()
#the readlines() reads the contents of the file, line by line and returns a list of lines. Therefore, file_contents contains a list of lines read from file object and can be iterated over to get each line.