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

Carlos Nepomuceno carlosnepomuceno at outlook.com
Tue May 28 02:52:10 EDT 2013


________________________________
> Date: Tue, 28 May 2013 07:40:07 +0100 
> Subject: RE: Total Beginner - Extracting Data from a Database Online  
> (Screenshot) 
> From: pconnell at gmail.com 
[...]
> > 
> > c11 = [tables[0][r][10] for r in range(len(tables[0]))] 
>  
> Or rather: 
>  
> c11 = [row[10] for row in tables[0]] 
>  
> In most cases, range(len(x)) is a sign that you're doing it wrong :)

Indeed! Much better that way! \o 		 	   		  


More information about the Python-list mailing list