title: How to remove EOFError: EOF when reading a line?
body: <p>Basically, I have to check whether a particular pattern appear in a line or not. If yes, I have to print that line otherwise not. So here is my code:</p>
  
  <pre><code>p = input()
   while 1:
     line = input()
     a=line.find(p)
     if a!=-1:
       print(line)
     if line=='':
       break
  </code></pre>
  
  <p>This code seems to be good and is being accepted as the correct answer. But there's a catch. I'm getting a run time error EOFError: EOF when reading a line which is being overlooked by the code testing website.</p>
  
  <p>I have three questions:
  1) Why it is being overlooked?
  2) How to remove it?
  3) Is there a better way to solve the problem?</p>