title: CsvReader Next function
body: <p>i am given a csv file but i want to skip the first row of data and move on to the next. Here is my code:</p>
  
  <pre><code>def read_csv(inputfile):
      return list(csv.reader(inputfile)) #&lt;-----
  
  def generate_xml(reader,outfile):
      root = Element('Solution')
      root.set('version','1.0')
      tree = ElementTree(root)        
      head = SubElement(root, 'DrillHoles')
      description = SubElement(head,'description')
      current_group = None
      i = 1
      for row in reader.next(): #&lt;-----
          x1,y1,z1,x2,y2,z2,cost = row
          if current_group is None or i != current_group.text:
              current_group = SubElement(description, 'hole',{'hole_id':"%s"%i})
  
              collar = SubElement(current_group,'collar')
              toe = SubElement(current_group,'toe')
              cost1 = SubElement(current_group,'cost')
              collar.text = ','.join((x1,y1,z1))
              toe.text = ','.join((x2,y2,z2))
              cost1.text = cost
          i+=1
      head.set('total_holes', '%s'%i)
      indent.indent(root)
      tree.write(outfile)
  </code></pre>
  
  <p>As you can see, i return the csv file as a list then i pass it onto the generate_xml function. However when i run the complete program there is an </p>
  
  <pre><code>error: 'list' object has no attribute 'next'
  </code></pre>