Skip to content

Instantly share code, notes, and snippets.

@Snawoot
Created April 28, 2013 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Snawoot/5477408 to your computer and use it in GitHub Desktop.
Save Snawoot/5477408 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
my_dict = {
'key1': 'value1',
'key2': 0,
'key3': 'value3'
}
print my_dict
for key, value in my_dict.iteritems():
if value == 0:
print "Zero key is %s" % key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment