from typing import Union
from typing import Any


def get_nth_with_default(list_: Union[list, tuple], n: int, default: Any = None) -> Any:
    """
    Return the n-th element of a list, or default if the list does not have the n-th element.
    :param list_: List or tuple to get from.
    :param n: Index to get.
    :param default: In case the list is not long enough, return this default.
    :return: n-th element of the list, or the default if there is no n-th element in the list.
    """
    if n < 0 or n >= len(list_):
        return default
    else:
        return list_[n]