Extracting String From a variable Python
I have something like this stored in a variable after doing
''.join(soup.findAll(text=True)) to a parsed url and i have to fetch the
school along with score and who it is playing with according to the
argument given..some thing like test.py "norfolk st." should fetch the
score like 'Norfolk St. 0-38 Rutgers' ...I tried using several functions
like re.search(),string.find() and parsing through the characters which
are not able to fetch the expected result? Need help
Norfolk St.
0 - 38
Rutgers
Final
South Florida
6 - 21
Michigan St.
Final
Chowan
7 - 47
Charlotte
Final
SE Louisiana
17 - 38
(24) TCU
Final
W. Kentucky
20 - 52
Tennessee
Final
S. Carolina St.
13 - 52
(4) Clemson
Final
Middle Tenn. St.
20 - 40
North Carolina
Final
Central Conn. St.
44 - 51
Lehigh
Final OT
Army
14 - 40
Ball St.
Final
No comments:
Post a Comment