vendredi 22 juillet 2016

Lists and printing

I'm writing a hang man program and I want to iteratively print the correct letters the user guesses that match the letters stored in a word the user is guessing. I want to show the user the index of each correct letter guessed while leaving the index positions of not guessed letters blank.

if user_letter in py_word:
   print(py_word[x]) 

user_letter stores the user input and py_word stores the word from a word_bank array. Thank you.

Aucun commentaire:

Enregistrer un commentaire