Gnarlodious <gnarlodi...@gmail.com> writes: > 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?
Untested: def unfav(x): if type(x) != dict: return x return dict((k,unfav(v)) for k,v in x.iteritems() if k != 'favicon') -- http://mail.python.org/mailman/listinfo/python-list