title: Iterating through an array and searching for each item in the array in a file
body: <p>I don't know if I'm even asking this question the right way, but I want to search through a log file and look for each word in an array. At this point, I've asked the user to drag the file in question into terminal, then to build an array out of inputs. the program should print out every line a word is found in.</p>
  
  <p>Once I get that working I'll format, have a counter, or make a little summary of what I found in the file, etc.</p>
  
  <p>Here's what I've got so far, only when I run it, it doesn't actually find any words. I've been looking through re usage examples, but I think may be overly complicated for what I have in mind:</p>
  
  <pre><code>def wordsToFind():
      needsWords = True
      searchArray = []
      print "Add words to search ('done') to save/continue."
      while needsWords == True:
          word = raw_input("Enter a search word: ")
          if word.lower() == "done":
              needsWords = False
              break
          else:
              searchArray.append(word)
              print word + " added"
      return searchArray
  
  def getFile():
      file_to_read = raw_input("Drag file here:").strip()
      return file_to_read
  
  def main():
      filePath = getFile()
      searchArray = wordsToFind()
      print "Words searched for: ", searchArray
      searchCount = []
  
      with open(filePath, "r") as inFile:
          for line in inFile:
              for item in searchArray:
                  if item in line:
                      print item
  
  
  main()
  </code></pre>
  
  <p>Obviously, any suggestions to optimize or recommendations for better python-coding are strongly welcomed here, I only know what I know, and appreciate all the help!</p>