Hellrocker

Untitled

Mar 8th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. word = input("Enter the word: ")
  2.  
  3. dash_list = []
  4. word_list = []
  5.  
  6. for i in word:
  7. word_list.append(i)
  8.  
  9. for i in range(len(word)):
  10. dash_list.append('_')
  11.  
  12. guess_char = input("Guess the character: ")
  13.  
  14. for n, j in enumerate(word_list):
  15. if guess_char == j:
  16. dash_list[n] = guess_char
  17.  
  18. print(' '.join(dash_list))
Add Comment
Please, Sign In to add comment