Skip to content

Instantly share code, notes, and snippets.

@tkmru
Created August 6, 2013 18:16
Show Gist options
  • Save tkmru/6167064 to your computer and use it in GitHub Desktop.
Save tkmru/6167064 to your computer and use it in GitHub Desktop.
It make dict from two list. Using zip() become easy.
# coding: UTF-8
keys = ['one', 'two', 'three']
values = [1, 2, 3]
dict(zip(keys, values)) #return {'three': 3, 'two': 2, 'one': 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment