Xah Lee wrote: > # reading entire file as a list, of lines > # mylist = f.readlines() To do this efficiently on a large file (dozens or hundreds of megs), you should use the 'sizehint' parameter so as not to use too much memory: sizehint = 0 mylist = f.readlines(sizehint)