To be completely correct, you should allow for the possibility that
the word found is the last word in the list
for j, word in enumerate(words):
    if (word.startswith("b")) and (j+1 < len(words)):
        print words[j+1]
        break
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to