removing dictionary key-pair

bruno at modulix onurb at xiludom.gro
Fri Jun 9 10:24:37 EDT 2006


JD wrote:
> Hello,
> 
> I try to remove a dictionary key-pair (remove an entry), 
> but I'm unsuccessful. Does anyone know how to achieve this?
> 
> Thanks

mydict = {"key" : "value"}
del mydict(key)

-- 
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