import random WORDS = ( "python", "jumble", "rensselaer" ) word = random.choice( WORDS ) correct = word jumble = "" while word: position = random.randrange( len(word) ) jumble += word[position] word = word[:position] + word[(position+1):] print "JUMBLE:", jumble guess = raw_input("guess? ") while guess.lower() != correct: print "wrong" guess = raw_input("guess again? ") print "got it"