title: Read next line in Python
body: <p>I am trying to figure out how to search for a string in a text file, and if that string is found, output the next line.</p>
  
  <p>I've looked at some similar questions on here but couldn't get anything from them to help me.</p>
  
  <p>This is the program I have made. I have made it solely to solve this specific problem and so it's also probably not perfect in many other ways.</p>
  
  <pre><code>def searcher():
      print("Please enter the term you would like the definition for")
      find = input()
      with open ('glossaryterms.txt', 'r') as file:
          for line in file:
              if find in line:
                  print(line)
  </code></pre>
  
  <p>So the text file will be made up of the term and then the definition below it. </p>
  
  <p>For example:</p>
  
  <blockquote>
    <p>Python<br>
    A programming language I am using</p>
  </blockquote>
  
  <p>If the user searches for the term <code>Python</code>, the program should output the definition.</p>
  
  <p>I have tried different combinations of print (line+1) etc. but no luck so far.</p>