'For loop to analyze every item in an array not analyzing well. (For wordle solver)
def remOra(guess, words, index):
newList = []
for word in words:
if (guess[index] != word[index]) and (guess[index] in word):
newList.append(word)
return newList
Guess is the current word that was guessed, words is the word list, and index is the index of the orange letter. The problem is that some words that should be added to the newList, are not being added. Example would be with the wordle being 'crony', and having 'ro' orange and everything else grey. I know the problem is in this function. When I run crony by itself in the if statement without a for loop, it works, but it does not work while checking every item in the list.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
