wordlist = [ "we", "the", "people", "of", "united", "states" ] while True: try: inword = input("Your word> ") except EOFError: break except: print("error but no idea what") break print(inword) isinlist = False for word in wordlist: if word == inword: isinlist = True break if isinlist: print("It's in the list") else: print("It's not in the list")