title: Comparing two identical strings returns false (Python 3)
body: <p>I have a code where I have a list of strings that I compare to strings from a text file input (word by word). This code is for a project I have that involves identifying some keywords.</p>
  
  <p>In my text file, I have a single word per line. So it would look like this:</p>
  
  <p>sucks</p>
  
  <p>cool</p>
  
  <p>interesting</p>
  
  <hr>
  
  <p>This is the code:</p>
  
  <pre><code>list = ["that sucks", "Better luck next time!"]
  
  for x in list:
      f = open ("keywords.txt", "r", encoding="utf-8")
  
      for l in range (1, 4):
          s = f.readline()
  
          for y in x.split():
              if str(y) == str(s):
                  print (y)
      f.close()
  </code></pre>
  
  <p>I have tried printing the results of y == s and kept on getting false for all cases and I have no idea why...</p>