def final_nonzero(L):
    """
    Return the index of the last non-zero value in the list.
    """
    for index, val in reversed(list(enumerate(L))):
        if val:
            return(index)

    return(0)