def get_list_elem(obj, idx, dft):
    """
    Returns element at index or default
    :param obj: list
    :param idx: index
    :param dft: default value
    :return: element
    """
    if len(obj) - 1 < idx:
        return dft
    return obj[idx]