title: skip 2 lines after a match in python
body: <p>I am trying to skip 2 lines after I got a match, as shown here.
  I have tried <a href="https://stackoverflow.com/questions/8003293/skipping-a-line-while-reading-a-file-with-a-for-loop">skipping a line while reading a file with a for loop</a> 
  which is giving me error:</p>
  
  <pre><code> fin.next()
  AttributeError: '_io.TextIOWrapper' object has no attribute 'next'
  </code></pre>
  
  <p>My complete code, input, output and expected output is pasted. I am a newbie. Kindly help.</p>
  
  <pre><code>#!/usr/bin/python3     fin.next()
  AttributeError: '_io.TextIOWrapper' object has no attribute 'next'
  import sys
  inp = str(sys.argv[1])
  print(inp)
  
  mesh = []
  with open(inp, 'r') as fin:
      for line in fin:
          if line.startswith("NQ"):
              nq = int(line[6:].strip())
          if line.startswith("NT"):     # Number of elements
              nt = int(line[6:].strip())
          if line.startswith("NM"):     # Number of type
              nm = int(line[6:].strip())
          if line.startswith("IREL"):
              irel = line[6:].strip()
          if line.startswith("NSPIN"):
              nspin = line[6:].strip()
  
  
  # Getting the Mesh
          if line.startswith("MESH-TYPE EXPONENTIAL"):
              fin.readline(1)
              for i in range(nm):
                  mesh = line.split()
                  print(mesh)
  </code></pre>
  
  <p>input:</p>
  
  <pre><code>*******************************
  GLOBAL SYSTEM PARAMETER
  NQ                 2
  NT                 2
  NM                 2
  IREL               3
  NSPIN              1
  *******************************************************************************
  MESH INFORMATION
  MESH-TYPE EXPONENTIAL 
     IM       R(1)                  DX              JRMT       RMT             JRWS       RWS
      1  1.00000000000000E-06  2.02543202000000E-02  716  1.94855715851499E+00  721  2.15458905088026E+00
      2  1.00000000000000E-06  2.03289742000000E-02  713  1.94855715851499E+00  721  2.27356898717917E+00
  *******************************************************************************
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>['MESH-TYPE', 'EXPONENTIAL']
  ['MESH-TYPE', 'EXPONENTIAL']
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>1  1.00000000000000E-06  2.02543202000000E-02  716  1.94855715851499E+00  721  2.15458905088026E+00
  2  1.00000000000000E-06  2.03289742000000E-02  713  1.94855715851499E+00  721  2.27356898717917E+00
  </code></pre>