Skip to content

Instantly share code, notes, and snippets.

@91pavan
Last active December 18, 2015 10:49
Show Gist options
  • Save 91pavan/5770925 to your computer and use it in GitHub Desktop.
Save 91pavan/5770925 to your computer and use it in GitHub Desktop.
Convert a list into dictionary and dictionary into lists!
def zipdict(names, values):
return dict(zip(names, values))
def unzipdict(mydict):
list1 = mydict.keys()
list2 = mydict.values()
return list1, list2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment