Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create dictionary python from two lists

>>> keys = ['a', 'b', 'c']
>>> values = [1, 2, 3]
>>> dictionary = dict(zip(keys, values))
>>> print(dictionary)
{'a': 1, 'b': 2, 'c': 3}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #dictionary #python #lists
ADD COMMENT
Topic
Name
7+8 =