Re: [Tutor] return first line

2010-03-15 Thread Norman Khine
hi, i tried this, my problem is that the file isfrom a python list - here is the code i have so far: http://paste.lisp.org/+22E5/1 as the first line for each item contains the 'title' which has different tags, i want to find a way to strip this out. any advise much appreciated On Mo

Re: [Tutor] return first line

2010-03-15 Thread Rafik Ouerchefani
Hi, assuming that your content is in input.txt, you can do : >>> f = open("/path/to/content.txt") >>> f.readline() it will return the first line only cheers, - Rafik ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription option

[Tutor] return first line

2010-03-15 Thread Norman Khine
hello, i have this string http://paste.lisp.org/+22E5 which is extracted from an html page file using regex. the issue i have is that i am unsure how to strip the first tag in this case Association NAtionale des Producteurs de QUInoa (ANAPQUI) as on the pages this is not consistent. for example s