Skip to content

Instantly share code, notes, and snippets.

@tjguk
Created September 21, 2019 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjguk/541e84b2a01c133fecd99ec114285d65 to your computer and use it in GitHub Desktop.
Save tjguk/541e84b2a01c133fecd99ec114285d65 to your computer and use it in GitHub Desktop.
book_file = open("""bleak-house.txt""")
book_text = book_file.read()
print(book_text[:200])
words = book_text.lower().split()
print(words[:200])
input_word=input("Please enter a word: ").lower()
print(input_word)
print(len(words), "words")
if input_word in words:
print("Found it")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment