title: checking if word exists in a text file python
body: <p>I'm working with Python, and I'm trying to find out if a word is in a text file. i am using this code but it always print the "word not found", i think there is some logical error in the condition, anyone please if you can correct this code:     </p>
  
  <pre><code>file = open("search.txt")
      print(file.read())
      search_word = input("enter a word you want to search in file: ")
      if(search_word == file):
          print("word found")
      else:
          print("word not found")
  </code></pre>