Skip to content

Instantly share code, notes, and snippets.

@jctanner
Created February 6, 2014 20:24
Show Gist options
  • Save jctanner/8851832 to your computer and use it in GitHub Desktop.
Save jctanner/8851832 to your computer and use it in GitHub Desktop.
def _set_none_to_blank(dictionary):
result = dictionary
for k in result.iterkeys():
if type(result[k]) == dict:
result[k] = _set_non_to_blank(result[k])
elif not result[k]:
result[k] = ""
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment