Lists to dictionary
Combines two lists into a dictionary, where the elements of the first one serve as the keys and the elements of the second one serve as the values. The values of the first list need to be unique and hashable.
- Use
zip()
in combination withdict()
to combine the values of the two lists into a dictionary.