comple list slices

William Meyer wmmeyer at gmail.com
Tue Feb 28 11:48:49 EST 2006


 <johnzenger <at> gmail.com> writes:

> 
> Python lets you iterate through a list using an integer index, too,
> although if you do so we will make fun of you.  You can accomplish it
> with a while loop, as in:
> 
> i = 0
> while i < len(rows):
>    if rows[i] == "This code looks like BASIC without the WEND, doesn't
> it?":


ahh, that would work. Yea its really ugly too. I will probably just use the
shandy.b's suggestion squirreled away in a method. I shouldnt even care, its
just one extra conditional per row






More information about the Python-list mailing list