Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python create dictionary from key value

>>> L1 = ['a','b','c','d']
>>> L2 = [1,2,3,4]
>>> d = dict(zip(L1,L2))
>>> d
{'a': 1, 'b': 2, 'c': 3, 'd': 4}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #create #dictionary #key
ADD COMMENT
Topic
Name
4+6 =