On 12/17/2012 12:27 PM, Gnarlodious wrote:
> Hello. What I want to do is delete every dictionary key/value of the name 
> 'Favicon' regardless of depth in subdicts, of which there are many. What is 
> the best way to do it?
>
> -- Gnarlie
I would write a recursive function that accepts a dict.

In that function, if a key "Favicon" exists, then remove it. Then loop
through the dictionary key/value pairs, and for any value that's an
instance of dict, call yourself recursively.

Give it a try, and if it won't work, supply us with a bit more
information, starting with a sample dict, and the python version you're
aiming at.




-- 

DaveA

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to