"tee chwee liong" <tc...@hotmail.com> wrote
t> hanks for catching the bug. the code should be:
s='11100101'
found = False
for i,c in enumerate(reversed(s)):
   if c == '0':
       print 'Lane fail',i
       found = True
       if not found: print 'All lanes PASS'

the if not found needs to be indented.

No, exactly the opposite - the last line needs to be ex-dented. ie taken out of the loop.
Take a look at my original post.

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to