How to check both word length and word in txt file?

The repl is checking if the word is 5 letters wrong and is a word in ‘wordlist.txt’

If you input a 5 letter word the first time it works, but after you put a word that doesn’t exist it constantly says it’s not a word after each input. How do I fix it?

Hi @snipchu thanks for your message.

I forked your Repl and ran it twice.

The first time I entered happy and it returned

The second time I entered d as you did in the original message. Then I entered happy to see if I could replicate the error:

Unfortunately I cannot replicate your error. Can you try again and let me know if you still get the same issue?

I was able to solve it myself, sorry for not closing this post earlier. I just used a local variable instead of a global variable

Thank you for reaching out though!! I appreciate it

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.