Re: [Tutor] List and comprehension questions

2007-02-25 Thread Bob Gailer
Kent Johnson wrote: > Smith, Jeff wrote: > >> I'm getting use to using list iteration and comprehension but still have >> some questions. >> >> 1. I know to replace >> for i in range(len(list1)): >> do things with list1[i] >> with >> for li in list1: >> do things with li

Re: [Tutor] List and comprehension questions

2007-02-25 Thread Kent Johnson
Smith, Jeff wrote: > I'm getting use to using list iteration and comprehension but still have > some questions. > > 1. I know to replace > for i in range(len(list1)): > do things with list1[i] > with > for li in list1: > do things with li > but what if there are two lists t

[Tutor] List and comprehension questions

2007-02-25 Thread Smith, Jeff
I'm getting use to using list iteration and comprehension but still have some questions. 1. I know to replace for i in range(len(list1)): do things with list1[i] with for li in list1: do things with li but what if there are two lists that you need to access in sync. Is the