About deletion of variables in version 2.1

Jason Orendorff jason at jorendorff.com
Mon Mar 11 15:34:44 EST 2002


Juan Huertas wrote:
> Reading a large file and loading to a list:
> 
> f=open('c:/xx','rb')
> ls=[]
> while not eof:
>     ln=f.readline()
>     ls.append(ln)
> 
> This takes 5 seconds (reasonable)

This code is a little nonsensical.  Could you post real code
that can be tested?

## Jason Orendorff    http://www.jorendorff.com/





More information about the Python-list mailing list