removing dictionary key-pair

akameswaran at akameswaran at
Fri Jun 9 16:25:10 CEST 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

Assuming you know the key:

d = {"foo":1,"bar":2}
print d
print d

More information about the Python-list mailing list