> Is there any function where I can specify to python
> buit-in function to select specific line (such as
> starting from segment: page 22 TO the next new line)
> instead of the whole lines until EOF. 
> e.g.:
> a = readlines (From , TO )

Not quite, but you can do:

readlines()[from:to]

With the disadvantage that the whoile file gets read 
into RAM before the slicing takes place - but then it 
gets garbage collected again pretty well immediately...

HTH,

Alan G.

_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to