title: Conditional Statement to compare line of a text file to each line of another file
body: <p>I'm trying to compare multiple lists in Python. The idea is that we have multiple lists and are comparing each item in each list to a list of aggregated unique values. We then create an excel sheet where we would show each list side by side and any values missing from a particular list would show as PLACEHOLDER in that cell. </p>
  
  <p>(I had a hard time explaining, but if you don't understand after reading please ask questions and I'll adjust the explanation accordingly )</p>
  
  <pre><code>filecount = 0
  for file in files:
      filecount += 1
      with open(file) as file_object:
          row = 0
          for line in agg_Names:
              #if line match, output to row
              print (file_object)
              if line in file_object.readlines():
                  worksheet.write(row, filecount, line)
                  row += 1
                  print ("found match")
  </code></pre>
  
  <p>The last if statement isn't right. It's supposed to compare each item in agg_Names to the current list and output the value. Currently, I'm only getting matches on the first row.</p>