title: How to print next line in python
body: <p>I am trying to print next 3 lines after a match</p>
  
  <p>for example input is :</p>
  
  <pre><code>Testing
  Result
  test1 : 12345
  test2 : 23453
  test3 : 2345454
  </code></pre>
  
  <p>so i am trying to search <strong>"Result"</strong> string in file and print next 3 lines from it:</p>
  
  <p><strong>Output will be :-</strong></p>
  
  <pre><code>test1 : 12345
  test2 : 23453
  test3 : 2345454
  </code></pre>
  
  <p>my code is :</p>
  
  <pre><code>with open(filename, 'r+') as f:
      for line in f:
          print line
          if "Benchmark Results" in f:
              print f
              print next(f)
  </code></pre>
  
  <p>its only giving me the output :</p>
  
  <pre><code>testing
  </code></pre>
  
  <p>how do i get my desired output, help please</p>