title: Finding Unique text in html file
body: <p>I am looking to find a way to identify and print sentences in one html file that are different from sentences in another html file. To do this, I have made three functions, one to open, read, strip blank space, and strip the text in the html, one to make a list of original strings that will be compared to, and one to compare the strings to all original strings. This is what I have so far.</p>
  
  <pre><code>def openTXT(txt):
      text=open(txt).read()
      StripText=text.strip()
      StripSplitText=StripText.split('.')
      return StripSplitText
  
  
  def originalSentances(folder):
      sentanceList=[]
      for item in folder:
          for sentance in item:
              if item not in sentanceList:
                  sentanceList.append(item)
      return sentanceList
  
  def findUniqueText(massMailerText,inputFolder, outputFile):
      for item in inputFolder:
          results=open('outputFile','w')
          results.write(item)
          text=openTXT(item)
          for sentance in text:
              if sentance in massMailerText:
                  pass
              else:
                  outputFile.write(sentance)
  
  massMailSentances= originalSentances('original')
  findUniqueText(massMailSentances,'modified','uniqueResults.txt')
  </code></pre>
  
  <p>When I run this on a file I get an error that says "No suck file or directory: 'm') Any ideas why this is happening and how I could fix this problem?</p>
  
  <p>If this is helpful, the kernel also prints out this</p>
  
  <blockquote>
    <p>IOError                                   Traceback (most recent call
    last) C:\Users\amcclure\Desktop\findUniqueText.py in ()
         28 
         29 massMailSentances= originalSentances('original')
    ---> 30 findUniqueText(massMailSentances,'modified','uniqueResults.txt')</p>
    
    <p>C:\Users\amcclure\Desktop\findUniqueText.py in
    findUniqueText(massMailerText, inputFolder, outputFile)
         20         results=open('outputFile','w')
         21         results.write(item)
    ---> 22         text=openTXT(item)
         23         for sentance in text:
         24             if sentance in massMailerText:</p>
    
    <p>C:\Users\amcclure\Desktop\findUniqueText.py in openTXT(txt)
          2 
          3 def openTXT(txt):
    ----> 4     text=open(txt).read()
          5     StripText=text.strip()
          6     StripSplitText=StripText.split('.')</p>
  </blockquote>