list_to_dict(list_or_dict: Union[list, Mapping])¶
Convert lists to int-indexed dicts.
Code is simplified by supporting only one universal data structure instead of implementing code paths for lists and dicts separately.
list_or_dict – The list to convert to dict. If it is already a dict, the dict is returned without modification.
The passed list as dict.