[Tutor] find() problem

Alan Gauld alan.gauld at btinternet.com
Tue Aug 24 19:53:41 CEST 2010


"Roelof Wobben" <rwobben at hotmail.com> wrote

> But it looks like it's in a indefinitive loop.
>
> What went wrong here ?

When debugging this kind of thing insert a raw_input() statement
in the loop(to force a pause)  and just before it print out the key
variables. That way you can see what is happening and what is
not working the way you expect.

In this case you could print out the start, index and character 
values.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list