Total Beginner - Extracting Data from a Database Online (Screenshot)

John Ladasky john_ladasky at sbcglobal.net
Sat May 25 21:33:25 EDT 2013


On Friday, May 24, 2013 4:36:35 PM UTC-7, Carlos Nepomuceno wrote:
> #to create the tables list
> tables=[[re.findall('<TD>(.*?)</TD>',r,re.S) for r in re.findall('<TR>(.*?)</TR>',t,re.S)] for t in re.findall('<TABLE>(.*?)</TABLE>',page,re.S)]
> 
> 
> Pretty simple. 

Two nested list comprehensions, with regex pattern matching?

Logan did say he was a "total beginner."  :^)



More information about the Python-list mailing list