Returns a list containing lines from the file.
- Optional. If the optional sizehint argument is present, instead of reading up to EOF, whole lines totalling approximately sizehint bytes (possibly after rounding up to an internal buffer size) are read.
Reads lines until EOF using readline() and return a list containing the lines thus read. Objects implementing a file-like interface may choose to ignore sizehint if it cannot be implemented, or cannot be implemented efficiently.
>>> f = open(r'C:\aiw.txt') >>> f.readlines() # this will return the list of all the lines in the file