# Step 3
import random
word_list = ["aardvark", "baboon", "camel"]
chosen_word = random.choice(word_list)
word_length = len(chosen_word)
# Testing code
print(f'Pssst, the solution is {chosen_word}.')
# Create blanks
display = []
for _ in range(word_length):
display += "_"
# Check guessed letter
endOfTeGame = False
while not endOfTeGame:
guess = input("Guess a letter: ").lower()
for position in range(word_length):
letter = chosen_word[position]
print(f"Current position: {position}\\n Current letter: {letter}\\n Guessed letter: {guess}")
if letter == guess:
display[position] = letter
print(display)
if "_" not in display:
endOfTeGame = True
print("You Win")