Here’s my problem:
If the guessed letter appears more than once in the word, only the first one is changed (from an asterisk).
answer = "hippo" #using hippo as a test word. Later will add a list of words and use random. show_word = list(len(answer) * "*") #the secret word or 'answer' is first represented by a string of ***'s. turn = 1 guesses = "" while turn < 10: guess = raw_input("guess a letter") if guess in answer: show_word[answer.index(guess)] = guess #if the guess is correct the corresponding asterisk is changed to the guessed letter print ''.join(show_word) else: print "no", guess guesses += guess turn += 1 print guesses