On Tue, Dec 4, 2012 at 2:58 PM, Neil Cerutti wrote:
> On 2012-12-04, Anatoli Hristov wrote:
>> The issue is now solved I did:
>>
>> for x in mylist:
>> try:
>> sku.append(x[4])
>> except IndexError:
>> pass
>>
>> Thank you for your help
>
> Optionally:
>
> for x in mylist:
On 2012-12-04, Anatoli Hristov wrote:
> The issue is now solved I did:
>
> for x in mylist:
> try:
> sku.append(x[4])
> except IndexError:
> pass
>
> Thank you for your help
Optionally:
for x in mylist:
if len(x) >= 4:
sku.append(x[4])
But do you really need
The issue is now solved I did:
for x in mylist:
try:
sku.append(x[4])
except IndexError:
pass
Thank you for your help
Anatoli
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Dec 4, 2012 at 12:31 PM, Thomas Bach
wrote:
> Hi there,
>
> Please be a bit more preciseā¦
>
> On Tue, Dec 04, 2012 at 12:00:05PM +0100, Anatoli Hristov wrote:
>>
>> The problem comes when I try to index the SKU array and the field is
>> empty
>
> Can you provide an example for that?
>
>> a
Hi there,
Please be a bit more preciseā¦
On Tue, Dec 04, 2012 at 12:00:05PM +0100, Anatoli Hristov wrote:
>
> The problem comes when I try to index the SKU array and the field is
> empty
Can you provide an example for that?
> and it seems that there I have empty array, I wanted to ignore the
>
Hello,
I tried to read a CSV file with 3 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