Way for see if dict has a key

Bruno Desthuilliers onurb at xiludom.gro
Fri Jun 30 12:27:31 EDT 2006


Fredrik Lundh wrote:
> Bruno Desthuilliers wrote:
> 
>> Seems that if "key in dict" do a simple linear search
> 
> 
> that would be rather silly.
> 
> hint: http://pyref.infogami.com/__contains__

Of course. It's just me being silly...

:(


Thanks F
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list