Answers for "create dictionary python with two lists"

3

python 3 how to set a dictionary from two lists

mydict = dict(zip(list1, list2))
Posted by: Guest on November-16-2020
1

create dict from two lists

keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
Posted by: Guest on March-16-2021

Code answers related to "create dictionary python with two lists"

Python Answers by Framework

Browse Popular Code Answers by Language