title: How do you make python keep reading lines until a condition is met?
body: <p>This is my current code:</p>
  
  <pre><code>StockSearch = input("Search For Product (Name Or Code):\n")
  with io.open('/home/jake/Projects/Stock','r', encoding='utf8') as f:
      for line in f:
          Read = f.readline()
          while Read!='':
              if StockSearch == Read:      
                  print (Read)
  </code></pre>
  
  <p>I'm trying to get python to keep reading every line of the file until there are none left and match the user's input with one of the lines, if not it'll print an error code. </p>
  
  <p>Thank you in advance.</p>