[Tutor] dynamic arrays?

Joel Goldstick joel.goldstick at gmail.com
Mon Sep 27 20:03:30 CEST 2010


On Mon, Sep 27, 2010 at 1:52 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Tue, 28 Sep 2010 02:12:55 am Joel Goldstick wrote:
>
>> a=[]
>> i=0
>> for l in open("file.txt", "r"):
>>  a[i]=l
>>   i+=1
>
> Did you try it before posting?
>
That is a copy of the OP post.  and it shows what didn't work

I deleted in my post, then realized I needed it for example, so cut
and pasted.  But, to answer your question, that code gives and
exception

Joel Goldstick
>
> --
> Steven D'Aprano
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Joel Goldstick


More information about the Tutor mailing list