How to make this faster

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jul 5 12:52:00 EDT 2013


On Fri, 05 Jul 2013 15:47:45 +0000, Helmut Jarausch wrote:

> > for r, row_lst in enumerate(Grid):
> >     for c, val in enumerate(row_lst):
>
> I assume the creation of the temporary lists "row_list" is a bit
> expensive.

No temporary list is being created. The pre-existing list is just being 
grabbed, which is fast.



-- 
Steven



More information about the Python-list mailing list