Skip to content

Instantly share code, notes, and snippets.

@alice1017
Created January 4, 2011 14:35
Show Gist options
  • Save alice1017/764827 to your computer and use it in GitHub Desktop.
Save alice1017/764827 to your computer and use it in GitHub Desktop.
辞書を展開するexp関数
def exp(dictionary):
item = {}
item["keys"] = []
item["values"] = []
for i,j in dictionary.iteritems():
item["keys"].append(i)
item["values"].append(j)
return item
def exp(dictionary):
item = ([],[])
for i,j in dictionary.iteritems():
item[0].append(i)
item[1].append(j)
return item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment