I am trying to make a program that takes a file which contains a list of words and user must enter a word that exists in the file. Can you tell me where is the wrong?
file = open('filename')
word_list = file.readlines()
print(word_list)
while True:
word = input('type in word, must be in English and at least 3 letters long: ')
if word in word_list:
break;
else:
print("Try Again")