Stuck: Can't work out the error - index error python 3.5
<p>Here is part of my code (the part that is raising the issues):</p>

<pre><code>with open('list.txt') as csvfile:
    readCSV = csv.reader(csvfile, delimiter = ",") 
    GTINs = []
    products = []
    prices = [] 
    for row in readCSV: 
        GTIN = int(row[0])
        product = row[1]
        price = float(row[2])

        GTINs.append(GTIN) 
        products.append(product)
        prices.append(price)
</code></pre>

<p>On this line:</p>

<pre><code>GTIN = int(row[0])
</code></pre>

<p>I keep getting the error "IndexError: list index out of range", I have no idea how to fix it. Here is the information I am trying to extract (.txt file): </p>

<pre><code>69696961,Milk,1.29
55555555,Bread,0.49
45632549,Milkshake,1.99
</code></pre>

<p>The error occurred when I made an alteration to the the program (took away two lines).</p>

<p>Any help would be well appreciated as I am well and truly stuck.</p>

<p>Try to remove empty lines from the list.txt file.</p>

python python-3.x