Hi, I am trying to read a string as csv, but I encountered an odd
problem. Here's my code:

        csvfile = csv.reader(datastr.split('\n'), delimiter=';')
        r = ''
        for i in csvfile:
                for j in i:
                        print j
                print i[0]

the "print j" statement works, but "print i[0]" returns "IndexError:
list index out of range". Am I missing something?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to