Created
November 7, 2013 16:18
-
-
Save OmarArain/7357310 to your computer and use it in GitHub Desktop.
Print all attributes of a i-th object in a dictionary
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
def printdict(inputdict,ix): | |
attr = vars(inputdict[inputdict.keys()[ix]]) | |
print ', '.join("%s: %s" % item for item in attr.items()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment