My hangman game keeps printing out extra underscores for every correct guess
Question:
word = input("Input your word> ").strip().lower()
list = []
counter = 6
def counter1():
global counter
counter -= 1
return counter
def checker():
for index in range(len(word)):
for index1 in range(len(list)):
if list[index1] in word[index]:
location1 = word.find(list[index1])
print(word[location1], end='')
else:
print("_",end='')
def program():
ask1 = input("Letter> ")
print()
if ask1.lower().strip() in list:
print()
print("
word = input("Input your word> ").strip().lower()
list = []
counter = 6
def counter1():
global counter
counter -= 1
return counter
def checker():
for index in range(len(word)):
for index1 in range(len(list)):
if list[index1] in word[index]:
location1 = word.find(list[index1])
print(word[location1], end='')
else:
print("_",end='')
def program():
ask1 = input("Letter> ")
print()
if ask1.lower().strip() in list:
print()
print("