Answers for "python pair two lists into a dictionary"

0

python pair two lists into a dictionary

#Two lists
keys = ["Foo", "Bar", "Done"]
values = [1, 6, 9]
  
d = dict(zip(keys, values))
d
>>>{'Foo': 1, 'Bar': 6, 'Done': 9}
Posted by: Guest on September-10-2021

Code answers related to "python pair two lists into a dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language