aspineux wrote: > > something like > > name=None > lines=[] > for line in open('yourfilename.txt'): > if line.startwith('>'): > if name!=None: > print 'Here is the record', name > print lines > print > name=line.stripr('\r') > lines=[] > else: > lines.append(line.stripr('\n')) >
That would miss the last chunk. -- Regards, Tijs -- http://mail.python.org/mailman/listinfo/python-list