Karol Bryd wrote: > I want to read a file (0.6MB, 10000 lines) into memory, and want to do it as > fast as possible, this code does it, but is terribly slow > > fp = open(file, 'r') > s = '' > while 1: > line = fp.readline() > if line == '': break > s = s + line > > (executing time 25 sec) This should be faster: s = open(file, 'r').read() cg.