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