> Name:
> City:
> xxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxx
> Characterstics of this text:
> 1. This text is divided into blocks and every block
> start with 'Name'. The number of lines after this
> identifier is random.
[snip]
> 1. mark the identifier i need and select all the lines
> after that identifier until it hits a new line or
> another name identifier.
A "while" loop was invented for those times in life where you don't
know in advance how many times you want to repeat something.
while line != "Name:":
bigfile.readline()
#once this loop exits, you know you've found the first "Name:" line
while line != "Name:":
bigfile.readline() #keep reading every line upto the NEXT one
do stuff here
_______________________________________________
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor