def create_index(lst):
    """ Creates a map of list elements to indices.

    Parameters
    ----------
    lst: list
        A list.

    Returns
    -------
    idx: dictionary
        A map of list elements to indices.

    """
    idx = {}
    for i in range(len(lst)):
        idx[lst[i]] = i
    return idx
