Skip to content

Instantly share code, notes, and snippets.

Created February 9, 2016 23:27
Show Gist options
  • Save anonymous/891c81941f384c6c360e to your computer and use it in GitHub Desktop.
Save anonymous/891c81941f384c6c360e to your computer and use it in GitHub Desktop.
Pasted from IPython
def dicty(d, key=None):
temp_d = {}
if key:
for k,v in d.items():
if k.lower() == key.lower():
print "{}: {}".format(k,v)
if isinstance(v, dict):
dicty(v, key)
if isinstance(v, list):
for x in v:
if isinstance(x, dict):
dicty(x, key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment