Jan-06-2018, 03:56 PM
Wow I didn't know that was all done already. Great! I'm trying to get better though. At this instance, after some research, I've managed to change my isValid() function to:
def isValid(word): file = open("wordsEn.txt", "r") for element in file.readlines(): if element==word: return True else: return FalseThough, if I test it with, for example, "extinguisher", it results me 'False'. This is strange, as the word 'extinguisher' is certainly in the list (I've looked it up). I don't really see what I'm doing wrong here :/