Skip to content

Instantly share code, notes, and snippets.

@OmarArain
Created November 7, 2013 16:18
Show Gist options
  • Save OmarArain/7357310 to your computer and use it in GitHub Desktop.
Save OmarArain/7357310 to your computer and use it in GitHub Desktop.
Print all attributes of a i-th object in a dictionary
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