def get(l, idx, default):
    """
    Safe list get
    :param l: list
    :param idx: index
    :param default: default value
    :return:
    """
    try:
        return l[idx]
    except IndexError:
        return default