def findIndexInList (L: list, item) -> int:
    """finds the index of an item in a given list"""

    for i in range (len (L)):
        if L[i] == item:
            return i
        
    # return -1 when unsuccessful
    return -1