title: readlines() function does not behave the same way as read() in a single line text
body: <pre><code>file.txt
          No device found
  **************************
      with open('file.txt', 'r') as f:
          if &quot;No device found&quot; in f.readlines():
              print('The requested wwn is not found on Brocade')
      
      output:
      Process finished with exit code 0
      
      
      with open('file.txt', 'r') as f:
          if &quot;No device found&quot; in f.read():
              print('The requested wwn is not found on Brocade')
      
      output:
      The requested wwn is not found on Brocade
      Process finished with exit code 0
  </code></pre>
  <p>read lines would read on line at a time, is that right? IF yes why doesnt it read the only line present in the file?</p>
  <p>Could someone explain what am I missing here?</p>
  <p>Thanks!</p>