Why isn't this Python code working?
I'm trying to create a simple program in speed to help me with one task in the "Keep talking and nobody explodes" game where you have a bunch of words, and the other person flips through available letter in order for you to determine what the correct word from the bunch is. But no matter what i input, I always get this and I don't know why: File "D:/Code/words.py", line 10, in check list.remove(word) ValueError: list.remove(x): x not in list Code is here: list = ["about","after","again","below","could","every","first","found","great","house","large","learn","never","other","place","plant","point","right","small","sound","spell","still","study","their","there","these","thing","think","three","water","where","which","world","would","write"] def check(p): while len(list) != 0: letter = input("Letter " + str(p+1) + ": ") for word in list: while p < len(word): if word[p] != letter: list.remove(word) p += p print(list) check(p) check(0)