Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python two list into dictinaray list comprehension

index = [1, 2, 3]
languages = ['python', 'c', 'c++']

dictionary = {k: v for k, v in zip(index, languages)}
print(dictionary)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #list #dictinaray #list #comprehension
ADD COMMENT
Topic
Name
9+3 =