Last active
May 2, 2019 20:46
-
-
Save sebw/6018235 to your computer and use it in GitHub Desktop.
Python iteration through dict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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