Re: [Tutor] line iteration in a file

2015-06-05 Thread richard kappler
SOLVED: Sometimes one just has to be an idiot. One must remember that computers count from zero, not from one. Changes my list indexes to reflect that small but crucial fundamental point, and all worked fine. regards, Richard On Wed, Jun 3, 2015 at 10:37 PM, richard kappler richkapp...@gmail.com

[Tutor] line iteration in a file

2015-06-03 Thread richard kappler
Figured out the string delimiters problem, thanks for all the help. Now I've run into another. I've used the re.finditer that I think it was Peter suggested. So I have: for line in file: s = line t = [m.start() for m in re.finditer(r], s)] q = len(t) which

Re: [Tutor] line iteration in a file

2015-06-03 Thread Cameron Simpson
On 03Jun2015 22:37, richard kappler richkapp...@gmail.com wrote: Figured out the string delimiters problem, thanks for all the help. Now I've run into another. I've used the re.finditer that I think it was Peter suggested. So I have: for line in file: s = line t =