def partition(text: str, length: int)->list:
    """
    split a text according to its length
    :param text: input text
    :param length: maximum length of each substring
    :return: a list of substrings
    """
    res=[]
    while len(text)>0:
        res.append(text[:length])
        text=text[length:]
    return res