[Q] How to ignore the first line of the text read from a file

Paul Rubin http
Thu Aug 28 06:01:48 EDT 2008


Ken Starks <straton at lampsacos.demon.co.uk> writes:
> LineList=open(filename,'r').readlines()[1,]

You don't want to do that if the file is very large.  Also,
you meant [1:] rather than [1,]




More information about the Python-list mailing list