title: How to print the next line from a text file python
body: <p>I am trying to print two lines of text from a text file in python which are next to eachother on a separate line. So the text file looks like this:</p>
  
  <pre><code>Apples
  Oranges
  Pears
  Lemons
  </code></pre>
  
  <p>And if someone inputs Apples I would like the program to print out:</p>
  
  <pre><code>Apples
  Oranges
  </code></pre>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>file = open('Fruit.txt',"r")
  for line in file:
      if InputText in line:
          print(line)
          print(line+1)
          return
  file.close() 
  </code></pre>
  
  <p>Of course the variable <code>line+1</code> isn't correct but I have left it there to illustrate that the next line of text must also be printed.</p>