WrongPosition method is not needed here. Try with these two methods.
def inWord(computerWord, userWord):
# Determine what letters are in the correct position
# make copies
realWord= list(computerWord)
# make copies
guess= list(userWord)
# iterate based on the shortest list length
for i in range(min(len(realWord), len(guess))):
# If the letter is in the list & in the correct spot, change it to a '*'
if realWord[i] != guess[i]:
# Change the letter in both to a '*'
realWord[i] = guess[i] = '*'
strrealword = ''
for letter in realWord:
strrealword += letter
return(strrealword)
and
def checkWord(user, computer, remaining):
# Iterate based on number of letters in guess
for letter_ind in range(len(user)):
if user[letter_ind] != computer[letter_ind] and computer.find(user[letter_ind]) != -1 and remaining.find(user[letter_ind]) == -1:
print('[', user[letter_ind], ']')
elif user[letter_ind] == computer[letter_ind]:
print('(', user[letter_ind], ')')
else:
print(user[letter_ind])