searching a value of a dict (each value is a list)

Pablo Ziliani pablo at decode.com.ar
Sun Dec 9 11:53:17 EST 2007


Seongsu Lee escribió:
> Hi,
>
> I have a dictionary with million keys. Each value in the
> dictionary has a list with up to thousand integers.
> (...)
>
> I want to find out the key value which has a specific
> integer in the list of its value.

Sorry if this is unhelpful, but have you considered moving your data 
model a proper database?
I ask because unless someone knows of a specific module, I think we are 
in DB's authentic realm. Is the fastest solution, probably not just for 
this particular operation you are trying to do.

Regards,
Pablo



More information about the Python-list mailing list