[Tutor] Unexpected results using enumerate() and .split()
boB Stepp
robertvstepp at gmail.com
Tue Mar 31 22:49:13 CEST 2015
On Tue, Mar 31, 2015 at 3:42 PM, Zachary Ware
<zachary.ware+pytut at gmail.com> wrote:
> Also, not that since you aren't using the index for anything, you
> don't need to use enumerate() to iterate over the list. Just do "for
> item in L:". Of course, if you actually use the index in the real
> code that I assume this was cut out of, keep enumerate; it's the right
> tool for the job.
Yeah, I simplified my actual code into the smallest snippet that I
could reproduce my problem in. My actual code need the index.
--
boB
More information about the Tutor
mailing list