Hello,

I tried to read a CSV file with 30000 products in it and index it into
a list using

file = open("ShopPrices.csv", "rbU")
reader = csv.reader(file, delimiter=";")
mylist = []

for x in reader:
    mylist.append(x)

The problem comes when I try to index the SKU array and the field is empty

for sku in mylist:
    print sku[3]

after the 3060 result I'm getting an error:

IndexError: list index out of range

and it seems that there I have empty array, I wanted to ignore the
empty arrays using if statement, but it does the same.

Thanks

Anatoli
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to