def default_split(data: str, separator: str=' ', default: str='', maxsplits: int=0) -> list:
    """
    Function to split a string and return a list of substring.
    If more splits requested than there are substrings then a
    default value is used.

    Args:
        data (str): String to be split.
        separator (str, optional): Seperator. Defaults to ' '.
        default (str, optional): Default split value. Defaults to ''.
        maxsplits (int, optional): Number of splits to perform. Defaults to 0 which means all.

    Returns:
        list: List of split values.
    """
    result = []

    if maxsplits <= 0:
        maxsplits = data.count(separator)

    while maxsplits:
        try:
            value, data = data.split(separator, 1)
        except ValueError:
            value = data
            data = default

        result.append(value)
        maxsplits -= 1

    result.append(data)
    return result