1 2 3 4 5 6 7 8 9
for word in sentence: if word == "quit": print ("Time to quit" ) break else: do_something_with(word) else: print ("There was no 'quit' in the sentence" ) print ("Now we're done...." )