Skip to content

Instantly share code, notes, and snippets.

@devashishpatil56
Created January 4, 2021 09:12
Show Gist options
  • Save devashishpatil56/9921cd27191d60725fafc5364151aeee to your computer and use it in GitHub Desktop.
Save devashishpatil56/9921cd27191d60725fafc5364151aeee to your computer and use it in GitHub Desktop.
list_1 = ["a", "b", "c", "d"]
list_2 = [1, 2, 3, 4]
dict_from_lists = dict(zip(list_1, list_2))
# dict_from_lists will be {'a': 1, 'b': 2, 'c': 3, 'd': 4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment