I have parsed a html document in python and i am storing the contents of the body tag in a list. Below is the code:
import urllib, re
text = urllib.urlopen("http://fiji4.ccs.neu.edu/~zerg/lemurcgi/lemur.cgi?d=0&g=p&v=algorithm&v=javed").read()
data = re.compile(r'.*?<BODY>(.*?)<HR>', re.DOTALL).match(text).group(1)
print data
the output of the following is:
6 3
12603 235 1
37210 363 3
64618 348 2
4 4
80073 560 1
80560 504 1
80875 807 1
80917 636 1
I want to store each new line in a new list. Need help in doing this. I am new to python. Thanks, ghbhatt.