title: match text within a file while iterating the folder structure
body: <p>I'm looking to match text that's in a list I pulled from word document file using docx
  I want to search my document folders files and print a match</p>
  
  <pre><code>import docx
  import os
  d = docx.Document('C:\\Users\\name\\document.docx')
  tables = list(d.tables)
  
  tbl = d.tables
  drive_firmware_list = []
  for table in tables:
      for row in table.rows:
          drive_firmware_list.append(row.cells[0].text)
  
  print(drive_firmware_list)
  </code></pre>
  
  <p>I pulled the need info from the document using the above code   </p>
  
  <pre><code>directory = ('C:\\Users\\name\\My_reports')
  doc_list =[]
  
  count = 0
  for subdir, dirs, files in os.walk(directory):
      for file in files:
          # print (os.path.join(subdir, file))
          filepath = subdir + os.sep + file
          if filepath.endswith(".docx"):
              if '2020'in filepath:# only selcting 2020 files 
                  count +=1
                  doc_list.append(filepath)
  
  #use "\n" .join to print the list on seperate lines
  # print('\n'.join(doc_list))
  
  for file in doc_list:
      if 'Optimize' not in file:
          doc_list.remove(file)
  print ('\n'.join(doc_list))
  </code></pre>
  
  <p>I iterated the folder and pulled all word doc files and removed the files I don't need using the above code I want to iterate doc_list against the drive_firmware_list array, and print matches. 
  what would be the best way to do this considering doc_list is a list of word docs?</p>