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)



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to