removing dictionary key-pair

danmcleran at yahoo.com danmcleran at yahoo.com
Fri Jun 9 10:26:32 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

d = dict(a=1, b=2, c=3)

print d

del d['a']

print d




More information about the Python-list mailing list