Mark Lawrence breamoreboy at
Mon Mar 15 09:46:31 CET 2010

vsoler wrote:
> I am working on a script that reads data from an excel workbook. The
> data is located in a named range whose first row contains the headers.
> It works!!!  I find it superb that python is able to do such things!!!
> Now my questions.
> a. My ranges can in practice be quite big, and although I am happy
> with the speed I get, because I am learning python, I think I could do
> it still a bit better. I think that the line   for i in matriz[1:]:
> could be improved with an iterator/generator, but I am not quite
> certain how I should proceed.

I write this :-
for j, i in enumerate(matriz):
     if j:

If there's a better method for some definition of better I'm certain 
we'll quickly get told.

Please see the python docs for the enumerate built-in.


Mark Lawrence.

[snip the rest]

More information about the Python-list mailing list