creating really big lists

John Machin sjmachin at lexicon.net
Wed Sep 5 09:09:24 EDT 2007


On Sep 5, 7:50 pm, Dr Mephesto <dnh... at googlemail.com> wrote:
> Hi!
>
> I would like to create a pretty big list of lists; a list 3,000,000
> long, each entry containing 5 empty lists. My application will append
> data each of the 5 sublists, so they will be of varying lengths (so no
> arrays!).

Will each and every of the 3,000,000 slots be used? If not, you may be
much better off storagewise if you used a dictionary instead of a
list, at the cost of slower access.

Cheers,
John




More information about the Python-list mailing list