def is_option_valid(obj_id, obj_list):
    """Validates that a user's selection is in a list.

    Parameters
    ----------
    obj_id : str
        A string id for a class instance.
    obj_list : list
        A list of instances for the same class.

    Returns
    -------
    bool
        True if successful, False otherwise.
    """
    err_msg = f"The selected option ({obj_id}) is invalid. Try again."
    try:
        int(obj_id)
    except ValueError:
        print(err_msg)
        return False
    else:
        if int(obj_id)-1 in range(len(obj_list)):
            return True
        else:
            print(err_msg)
            return False