title: Print nth line after line
body: <p>I am trying to print the nth line after a specific line in a file:</p>
  
  <pre><code>import glob
  import numpy as np
  import matplotlib.pyplot as plt
  import math
  
  velerror = []
  divergence = []
  mesh = []
  timestep = []
  totaltime = []
  
  for files in glob.glob('*.out'):
      f = open(files, 'r')
      for line in f:
          if "Maximum Velocity Error:" in line:
              velerror.append(float(line[32:40]))
          if "Grid Dimensions, Mesh" in line:
              mesh.append(int(line[27]))
          if "Time Step  " in line:
              timestep.append(int(line[17:27].strip()))
          if "Total time:" in line:
              totaltime.append(float(line[47:57].strip()))
              #Print nth line after line
  
  
  totaltime = totaltime[0::9]
  
  print(velerror)
  print(mesh)
  print(timestep)
  print(totaltime)
  </code></pre>
  
  <p>Is there a function like next() that goes to the next nth line?</p>