def min_index(l):
    """Returns the index of the min value"""
    m = float("inf")
    index = -1
    for i in range(len(l)):
        if l[i] < m:
            index = i
            m = l[i]
    return index