[Tutor] Fastest way to iterate through a file

Kent Johnson kent37 at tds.net
Mon Jul 2 01:03:04 CEST 2007


elis aeris wrote:
> no, this one:
> 
> 
> 
> In [4]:import array
> 
> In [5]:def f7(list):
>   .5.:  return array.array('B', list).tostring()
>   .5.:
> 
> In [6]:f7([97, 98, 99])
> Out[6]:'abc'

That has nothing at all to do with reading lines of a file. It is the 
fastest way to solve one particular problem, not every loop.

Kent


More information about the Tutor mailing list