Re: newb loop problem

2008-08-14 Thread Dave
On Aug 13, 8:46 am, Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > Dave <[EMAIL PROTECTED]> wrote: > >hitNum = 0 > >stopCnt = 6 + hitNum > >offSet = 5 > > >for i in range(0,10,1): > > The step argument to range defaults to 1: it's tidier to omit it. > Similarly, the start argument defaults to 0, so

Re: newb loop problem

2008-08-13 Thread Sion Arrowsmith
Dave <[EMAIL PROTECTED]> wrote: >hitNum = 0 >stopCnt = 6 + hitNum >offSet = 5 > >for i in range(0,10,1): The step argument to range defaults to 1: it's tidier to omit it. Similarly, the start argument defaults to 0, so you can drop that too. for i in range(10): > for x in range(hitNum,len

Re: newb loop problem

2008-08-13 Thread Larry Bates
Dave wrote: arrrggg, now I feel really dumb.. hitNum = 0 stopCnt = 6 + hitNum offSet = 5 for i in range(0,10,1): for x in range(hitNum,len(inLst), 1): print hitNum, stopCnt if x == stopCnt: break hitLst.append(inLst[x]) hitNum +=o

Re: newb loop problem

2008-08-13 Thread marek . rocki
Dave napisaƂ(a): > Hey there, having a bit of problem iterating through lists before i go > on any further, here is > a snip of the script. > -- > d = "a1 b1 c1 d1 e1 a2 b2 c2 d2 e2 a3 b3 c3 d3 e3 a4 b4 c4 d4 e4 a5 b5 > c5 d5 e5" > inLst = d.split() > hitLst = [] > > hitNum = 0 > stopCnt = 6 + hitN

Re: newb loop problem

2008-08-13 Thread Dave
arrrggg, now I feel really dumb.. hitNum = 0 stopCnt = 6 + hitNum offSet = 5 for i in range(0,10,1): for x in range(hitNum,len(inLst), 1): print hitNum, stopCnt if x == stopCnt: break hitLst.append(inLst[x]) hitNum +=offSet

Re: newb loop problem

2008-08-12 Thread Dave
On Aug 13, 12:35 am, Larry Bates <[EMAIL PROTECTED]> wrote: > Dave wrote: > > Hey there, having a bit of problem iterating through lists before i go > > on any further, here is > > a snip of the script. > > -- > > d = "a1 b1 c1 d1 e1 a2 b2 c2 d2 e2 a3 b3 c3 d3 e3 a4 b4 c4 d4 e4 a5 b5 > > c5 d5 e5"

Re: newb loop problem

2008-08-12 Thread Larry Bates
Dave wrote: Hey there, having a bit of problem iterating through lists before i go on any further, here is a snip of the script. -- d = "a1 b1 c1 d1 e1 a2 b2 c2 d2 e2 a3 b3 c3 d3 e3 a4 b4 c4 d4 e4 a5 b5 c5 d5 e5" inLst = d.split() hitLst = [] hitNum = 0 stopCnt = 6 + hitNum for i in range(hitNu

newb loop problem

2008-08-12 Thread Dave
Hey there, having a bit of problem iterating through lists before i go on any further, here is a snip of the script. -- d = "a1 b1 c1 d1 e1 a2 b2 c2 d2 e2 a3 b3 c3 d3 e3 a4 b4 c4 d4 e4 a5 b5 c5 d5 e5" inLst = d.split() hitLst = [] hitNum = 0 stopCnt = 6 + hitNum for i in range(hitNum,len(inLst),