python pair two lists into a dictionary

Solutions on MaxInterview for python pair two lists into a dictionary by the best coders in the world

showing results for - "python pair two lists into a dictionary"
Deann
25 Oct 2019
1#Two lists
2keys = ["Foo", "Bar", "Done"]
3values = [1, 6, 9]
4  
5d = dict(zip(keys, values))
6d
7>>>{'Foo': 1, 'Bar': 6, 'Done': 9}