Hi
Here is my solution:

def readcsvfile(filename,headerstring):
  headers = headerstring.split(',')

  f = open(filename, 'ro')
  csvdata = csv.DictReader(f)
  for row in csvdata:
    for column in headers[0:-1]:
      print row[column]+',',
    print row[headers[-1]]

Regards

On 23 April 2012 15:28, Gerhardus Geldenhuis <gerhardus.geldenh...@gmail.com
> wrote:

> Hi
> Thanks for all the replies, I will try a the suggestions and post my
> solution back.
>
> Regards
>
> --
> Gerhardus Geldenhuis
>



-- 
Gerhardus Geldenhuis
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to