While with break
while 1: word = raw_input('Please enter a word: ') if not word: break print 'The word was ' + word