- qspec. list_to_dict ( values , keys=None )[source]
-
Combine a list of values and a list of keys into a dictionary.
- Parameters:
-
- valuesarray_like
The values of the dictionary.
- keysarray_like | None
The keys of the dictionary. If omitted, the keys will be the indices of the values.
- Returns:
-
- adict
A dictionary with the given
valuesandkeys.