Skip to content

Instantly share code, notes, and snippets.

@sebw
Last active May 2, 2019 20:46
Show Gist options
  • Save sebw/6018235 to your computer and use it in GitHub Desktop.
Save sebw/6018235 to your computer and use it in GitHub Desktop.
Python iteration through dict
d = {'site1': {'servername': 'test.org', 'serveralias': 'www.test.org'}}
for key, value in d.iteritems():
print key
print value['servername']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment