Searching a large dictionary

Chris Rebert clp2 at rebertia.com
Wed Sep 23 00:22:29 CEST 2009


On Tue, Sep 22, 2009 at 2:50 PM, Support Desk
<support.desk.ipg at gmail.com> wrote:
> I need help searching a large python dictionary. The dictionary is setup
> like so
>
> Key[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]
>
> Key2[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]
>
> Key3[{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]

That is not valid syntax. Do you mean you have a dictionary like this?:

{ Key : [{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}],
Key2 : [{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}],
Key3 : [{'item':value,'item2':value,'item3':value,'item4':value,'item5':value','item6':value,'item7':value,'item8':value,'item9':value}]
}

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list