def insert_sort(inputlist):
    """
    直接插入排序，升序

    :param inputlist: a list of number
    :return: the ascending list
    """
    length = len(inputlist)
    for x in range(1, length):
        key = inputlist[x]  # 要插入的数
        i = x - 1
        while i >= 0:
            if inputlist[i] > key:
                inputlist[i + 1]=inputlist[i]
            else:
                break
            i -= 1
        inputlist[i + 1] = key
    return inputlist