title: why this python code doesn't print anagrams?
body: <pre><code>def is_anagram(s1,s2): 
      L1 = list(s1)
      L2 = list(s2)
  
      return sorted(L1) == sorted(L2)
  
  
  
  def read_words():
      fin = open('words.txt')
  
  
      for line in fin:
          line = fin.readline()
          word = line.strip()
  
          for line1 in fin:
              line1 = fin.readline()
              word1 = line1.strip()
              if is_anagram(word,word1):
                  print(word, word1)
   read_words()
  </code></pre>
  
  <p>When I run this it doesn't showup anything(not even a error).I am sure that words.txt include some anagrams.I can't figure out why this doesn't work.Please someone help.</p>
  
  <p>words.txt looks like this:</p>
  
  <pre><code>aa
  aah
  aahed
  aahing
  aahs
  aal
  aalii
  aaliis
  aals
  aardvark
  aardvarks
  aardwolf
  aardwolves
  aas
  aasvogel
  aasvogels
  aba
  abaca
  abacas
  abaci
  aback
  abacus
  abacuses
  abaft
  abaka
  abakas
  abalone
  abalones
  abamp
  abampere
  abamperes
  abamps
  abandon
  abandoned
  abandoning
  abandonment
  abandonments
  abandons
  abas
  abase
  abased
  abasedly
  abasement
  abasements
  abaser
  abasers
  abases
  abash
  abashed
  abashes
  abashing
  abasing
  abatable
  abate
  abated
  abatement
  abatements
  abater
  </code></pre>