Select as dictionary...

Duncan Booth duncan.booth at invalid.invalid
Tue Oct 2 09:54:52 CEST 2007


Abandoned <besturk at gmail.com> wrote:

>  ( I don't want to use FOR and APPEND because the
> query have 2 million result and i want to speed)
> 

How many times do you plan on doing this? On my system I just timed adding 
2 million elements to a dictionary: it took 0.35 seconds. Appending 2 
million elements to a list took 0.43 seconds.

Unless you really do need to repeat this operation many many many times 
then just write the obvious code instead of wasting your (and our) time 
trying to micro-optimise.



More information about the Python-list mailing list