read a files particular line

Kristóf Stróbl kristof at
Thu Oct 14 11:42:03 CEST 2004


If the file is not too big use:



Frank Grellert wrote:

> Hi,
> does anybody have an idea how to read a particular line of a file like awk's
> awk '{if( NR==12) print $0}' filename (reads lineno 12 of filename)
> thanks for your help
> Frank Grellert

More information about the Python-list mailing list