creating really big lists

Dr Mephesto dnhkng at googlemail.com
Sat Sep 8 11:59:41 EDT 2007


On Sep 8, 3:33 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
> En Fri, 07 Sep 2007 16:16:46 -0300, Dr Mephesto <dnh... at googlemail.com>
> escribi?:
>
> > hey, that defaultdict thing looks pretty cool...
>
> > whats the overhead like for using a dictionary in python?
>
> Dictionaries are heavily optimized in Python. Access time is O(1),
> adding/removing elements is amortized O(1) (that is, constant time unless
> it has to grow/shrink some internal structures.)
>
> --
> Gabriel Genellina

well, I want to (maybe) have a dictionary where the value is a list of
5 lists. And I want to add a LOT of data to these lists. 10´s of
millions of pieces of data. Will this be a big problem? I can just try
it out in practice on monday too :)

thanks




More information about the Python-list mailing list