Delete common entries between two dictionaries

Paul Rubin http
Mon Nov 24 16:55:46 EST 2003


"Amy G" <amy-g-art at cox.net> writes:
> Now that I have the two, I want to delete each entry from one that the two
> have in common, leaving only those that are unique to the dictionary?
> 
> Say I have a dictionary called domains_black
> and another domains_white...

for k in domains_white():
   if k in domains_black:
      del domains_black[k]




More information about the Python-list mailing list